Skip to content

Commit

Permalink
dumpling: update the gc info (#18215) (#18224)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot committed Aug 1, 2024
1 parent 96b8818 commit 617aeb4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion develop/dev-guide-timeouts-in-tidb.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ TiDB 的事务的实现采用了 MVCC(多版本并发控制)机制,当新

> **Tip:**
>
> 特别地,在 Dumpling 备份时,如果导出的数据量少于 1 TB 且导出的 TiDB 版本为 v4.0.0 或更新版本,并且 Dumpling 可以访问 TiDB 集群的 PD 地址,Dumpling 会自动配置延长 GC 时间且不会对原集群造成影响。以下场景除外:
> 特别地,在 Dumpling 备份时,如果导出的数据量少于 1 TB 且导出的 TiDB 版本为 v4.0.0 或更新版本,并且 Dumpling 可以访问 TiDB 集群的 PD 地址以及 [`INFORMATION_SCHEMA.CLUSTER_INFO`](/information-schema/information-schema-cluster-info.md),Dumpling 会自动调整 GC 的 safe point 从而阻塞 GC 且不会对原集群造成影响。以下场景除外:
>
> - 数据量非常大(超过 1 TB)。
> - Dumpling 无法直接连接到 PD,例如 TiDB 集群运行在 TiDB Cloud 上,或者 TiDB 集群运行在 Kubernetes 上且与 Dumpling 分离。
Expand Down
4 changes: 2 additions & 2 deletions dumpling-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ TiDB 还提供了其他工具,你可以根据需要选择使用:
- 支持导出到 Amazon S3 云盘。
- 针对 TiDB 进行了更多优化:
- 支持配置 TiDB 单条 SQL 内存限制。
- 针对 TiDB v4.0.0 及更新版本,如果 Dumpling 能够直接连接到 PD,则支持自动调整 TiDB GC 时间
- 针对 TiDB v4.0.0 及更新版本,如果 Dumpling 能够访问 TiDB 集群的 PD 地址以及 [`INFORMATION_SCHEMA.CLUSTER_INFO`](/information-schema/information-schema-cluster-info.md),则支持自动调整 [GC](/garbage-collection-overview.md) 的 safe point 从而阻塞 GC
- 使用 TiDB 的隐藏列 `_tidb_rowid` 优化了单表内数据的并发导出性能。
- 对于 TiDB 可以设置 [tidb_snapshot](/read-historical-data.md#操作流程) 的值指定备份数据的时间点,从而保证备份的一致性,而不是通过 `FLUSH TABLES WITH READ LOCK` 来保证备份一致性。

Expand Down Expand Up @@ -296,7 +296,7 @@ Dumpling 导出 TiDB 较大单表(超过 1 TB)时,可能会因为导出数

### 手动设置 TiDB GC 时间

如果导出的 TiDB 版本为 v4.0.0 或更新版本,并且 Dumpling 可以访问 TiDB 集群的 PD 地址,Dumpling 会自动配置延长 GC 时间且不会对原集群造成影响
当导出的数据量少于 1 TB,导出的 TiDB 版本为 v4.0.0 或更新版本, Dumpling 可以访问 TiDB 集群的 PD 地址以及 [`INFORMATION_SCHEMA.CLUSTER_INFO`](/information-schema/information-schema-cluster-info.md) 表时,Dumpling 会自动调整 GC 的 safe point 从而阻塞 GC 且不会对原集群造成影响

但是,在以下场景中,Dumpling 无法自动调整 GC 时间:

Expand Down
2 changes: 1 addition & 1 deletion migrate-from-tidb-to-mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ summary: 了解如何将数据从 TiDB 集群迁移至与 MySQL 兼容的数据

1. 关闭 GC (Garbage Collection)。

为了保证增量迁移过程中新写入的数据不丢失,在开始全量导出之前,需要关闭上游集群的垃圾回收 (GC) 机制,以确保系统不再清理历史数据。
为了保证增量迁移过程中新写入的数据不丢失,在开始全量导出之前,需要关闭上游集群的垃圾回收 (GC) 机制,以确保系统不再清理历史数据。对于 TiDB v4.0.0 及之后的版本,Dumpling 可能会[自动调整 GC 的 safe point 从而阻塞 GC](/dumpling-overview.md#手动设置-tidb-gc-时间)。然而,手动关闭 GC 仍然是必要的,因为在 Dumpling 退出后,GC 可能会被触发,从而导致增量变更迁移失败。

执行如下命令关闭 GC:

Expand Down

0 comments on commit 617aeb4

Please sign in to comment.