Is it possible to modify the binlog_name and binlog_pos in the syncer table of the dm_meta dictionary database to handle binlog loss during TiDB full and incremental synchronization if data loss is not a concern?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: TiDB 全量+增量同步时候binlog丢失,在不在意数据丢失的情况下,是否可以通过修改dm_meta字典库中syncer表中binlog_name和binlog_pos

| username: TiDBer_mvrpvfaN

When TiDB full + incremental synchronization loses binlog, if you don’t care about data loss, can you modify the binlog_name and binlog_pos in the syncer table of the dm_meta dictionary database?

| username: songxuecheng | Original post link

Sure, but you need to ensure the table structure is consistent. Otherwise, there will be exceptions.

| username: TiDBer_mvrpvfaN | Original post link

How to operate without errors and continue synchronization when the structure is the same? Thank you.

| username: 大鱼海棠 | Original post link

Create a new task and start synchronization from a specified point using incremental synchronization.

| username: Hacker007 | Original post link

You can change the full task to an incremental task and specify the binlog position, but be mindful of whether the table structures are consistent.

| username: buchuitoudegou | Original post link

It is not recommended to modify dm_meta. The binlog_pos or gtid can be manually set when starting an incremental task:

mysql-instances:
  -
    source-id: "mysql-replica-01"           # Corresponds to `source-id` in source.toml
    meta:                                   # The starting position of binlog migration when `task-mode` is `incremental` and the `checkpoint` of the downstream database does not exist; if the checkpoint exists, it takes precedence. If neither the `meta` item nor the downstream database's `checkpoint` exists, migration starts from the latest binlog position upstream.
      binlog-name: binlog.000001
      binlog-pos: 4
      binlog-gtid: "03fc0263-28c7-11e7-a653-6c0b84d59f30:1-7041423,05474d3c-28c7-11e7-8352-203db246dd3d:1-170"  # For incremental tasks with `enable-gtid: true` specified in the source, this value needs to be specified.

You can stop the previous task and then reset a starting position.

FYI: DM 任务完整配置文件介绍 | PingCAP 文档中心

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.