From 2169d44b62be5952a39dc2208a4dd6734527fb0d Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 21 Apr 2021 17:15:33 +0800 Subject: [PATCH 1/2] Remove a missing F1 mention in docs --- tidb-computing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidb-computing.md b/tidb-computing.md index 516621b39c82f..a877f70993143 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. Changing schema online, 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. ## SQL layer overview From 8816f8d62cc2401c76bd11c322c17d83bf591c2f Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 21 Apr 2021 20:25:21 +0800 Subject: [PATCH 2/2] Update tidb-computing.md Co-authored-by: Charlotte Liu <37295236+CharLotteiu@users.noreply.github.com> --- tidb-computing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidb-computing.md b/tidb-computing.md index a877f70993143..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. Changing schema online, 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