From 332f210fadecea3a1455e80599d56f349e14c5fe Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Thu, 22 Apr 2021 11:23:54 +0800 Subject: [PATCH] cherry pick #5423 to release-4.0 Signed-off-by: ti-srebot --- tidb-computing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidb-computing.md b/tidb-computing.md index 516621b39c82f..d6e3390437e4d 100644 --- a/tidb-computing.md +++ b/tidb-computing.md @@ -111,7 +111,7 @@ Each database and table in TiDB has metadata that indicates its definition and v Each database or table is assigned a unique ID. As the unique identifier, when table data is encoded to Key-Value, this ID is encoded in the Key with the `m_` prefix. This constructs a key-value pair with the serialized metadata stored in it. -In addition, TiDB also uses a dedicated (Key, Value) key-value pair to store the latest version number of structure information of all tables. This key-value pair is global, and its version number is increased by `1` each time the state of the DDL operation changes. TiDB stores this key-value pair persistently in the PD server with the key of `/tidb/ddl/global_schema_version`, and Value is the version number value of the `int64` type. Inspired by Google F1's Online Schema change algorithm, TiDB keeps a background thread that constantly checks whether the version number of the table structure information stored in the PD server changes. This thread also ensures that the changes of version can be obtained within a certain period of time. +In addition, TiDB also uses a dedicated (Key, Value) key-value pair to store the latest version number of structure information of all tables. This key-value pair is global, and its version number is increased by `1` each time the state of the DDL operation changes. TiDB stores this key-value pair persistently in the PD server with the key of `/tidb/ddl/global_schema_version`, and Value is the version number value of the `int64` type. Meanwhile, because TiDB applies schema changes online, it keeps a background thread that constantly checks whether the version number of the table structure information stored in the PD server changes. This thread also ensures that the changes of version can be obtained within a certain period of time. ## SQL layer overview