pingcap / tiflow

This repo maintains DM (a data migration platform) and TiCDC (change data capture for TiDB)
Apache License 2.0
428 stars 286 forks source link

Enhance mqSink to support Low-latency/DDL-consistent/Txn-consistent modes #795

Open liuzix opened 4 years ago

liuzix commented 4 years ago

Feature Request

Is your feature request related to a problem? Please describe:

Describe the feature you'd like:

Current support/needs

Open Protocol Canal Avro
Low-latency Available Available Available
DDL-consistent No plan Needed to ensure correctness No need because there's no DDL output
Transaction-consistent Handled by consumer Planned No need because there's no semantics
amyangfei commented 4 years ago

Have one problem with the DDL operation in canal, if we dispatch DML data to multiple partitions, and DDL to the first partition, how does the consumer know when to consume DDL from the first partition. From another aspect, how does canal consumer know which DMLs are before one DDL, and which DMLs are after one DDL. Btw, I found a similar scenario about DML, DDL consumption with multiple MQ partitions. https://github.com/alibaba/canal/issues/2842

zier-one commented 4 years ago

also, see https://github.com/pingcap/ticdc/pull/708/files#diff-13ef8e2f0f85e13cd6f76c33fa8d982dR28,

there is a simple abstraction and implement about the transaction-consistent controller