pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
37.11k stars 5.83k forks source link

Binlogctl Generate meta problem #7738

Closed sakufo closed 6 years ago

sakufo commented 6 years ago

I need to synchronize the tidb data to the downstream mysql, which is the production library being used. My question is that I use binlogctl to get the meta information, then use mydumper to prepare. There will be a short time difference in this process. How to solve the meta in this time difference and a new change problem has occurred? I personally think that a good solution is to automatically record the meta information during the mydumper process and write it directly to the downstream table when importing. When the Drainer is started to synchronize data to the downstream database, the meta is read and the data is written starting from the next pos.

Question

Before asking a question, make sure you have:

jackysp commented 6 years ago

Thanks for your report, @sakufo ! PTAL @kennytm .

WangXiangUSTC commented 6 years ago

it dosen't matter, drainer can guarantee the binlog's idempotency.