From 69452c7379bca7935f1a0033e76dc5f9e4a8b7cf Mon Sep 17 00:00:00 2001 From: Frank945946 <108602632+Frank945946@users.noreply.github.com> Date: Thu, 2 Jan 2025 19:08:00 +0800 Subject: [PATCH] Add descriptions of load schema snapshot (#19835) --- tidb-binlog/tidb-binlog-configuration-file.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tidb-binlog/tidb-binlog-configuration-file.md b/tidb-binlog/tidb-binlog-configuration-file.md index 685fab283599f..34fa375bf961c 100644 --- a/tidb-binlog/tidb-binlog-configuration-file.md +++ b/tidb-binlog/tidb-binlog-configuration-file.md @@ -305,6 +305,14 @@ If the safe mode is enabled, Drainer modifies the replication updates in the fol Default value: `false` +#### load-schema-snapshot + +- Specifies how Drainer loads table information. +- When you set it to `false`, Drainer replays all DDL operations from history to derive the table schema for each table at a specific schema version. This approach requires processing all DDL changes from the initial state to the target schema version, which might involve significant data processing and replaying. +- When you set it to `true`, Drainer directly reads the table information at the checkpoint TS. Becasue it directly reads the table information at a specific point in time, this method is usually more efficient. However, it is subject to the GC mechanism, because GC might delete older data versions. If the checkpoint TS is too old, the corresponding table information might have been deleted by GC, making it impossible to read directly. +- When configuring Drainer, choose whether to read the table information at the checkpoint TS based on actual needs. If data integrity and consistency are priorities and handling a large number of DDL changes is acceptable, it is recommended to set it to `false`. If efficiency and performance are more important, and the checkpoint TS is guaranteed to be after the GC safe point, it is recommended to set it to `true`. +- Default value: `false` + ### syncer.to The `syncer.to` section introduces different types of downstream configuration items according to configuration types. @@ -349,4 +357,4 @@ When the downstream is Kafka, the valid configuration items are as follows: * `host` * `user` * `password` -* `port` \ No newline at end of file +* `port`