tidb icon indicating copy to clipboard operation
tidb copied to clipboard

Some questions about using tidb-binlog tool

Open ayzmkk opened this issue 8 years ago • 2 comments

Hi, we want to use tidb-binlog tool to subscribe to TiDB’s incremental data but we still have some questions.

  1. Does this tool ensure data ordering? For example, T1 writes to TiServer1, and T2 writes to TiServer2, is it possible for Drain downstream to get T2->T1 which is not ordered?
  2. Will Kafka partition affect ordering? Since kafka only guarantees ordering in one partition.
  3. How to ensure data is no loss if pump crashes?

Please give me some introductions, Thanks.

ayzmkk avatar Jan 09 '18 06:01 ayzmkk

first of all, drainer pulls binlogs from all pumps, then do sort.

  1. yep, drainer would ensure the order
  2. don't effect, now one pump writes one partition in kafka and drainer would restore order of binlogs. In addition, we have algorithm to restore order of binlogs on multiple partitions(one pump writes multiple partitions)
  3. pump and drainer has register and unregister mechanism, if pump crashs(offline and don't unregister), drainer would wait it restoration

IANTHEREAL avatar Jan 09 '18 08:01 IANTHEREAL

Hi @ayzmkk it looks like this was answered a little more than a year ago, so I'm going to close it now. If you have any followup questions related to this issue, please feel free to re-open it at any time.

kolbe avatar Mar 12 '19 16:03 kolbe