Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TiDB Cluster supports snapshot level consistency replication in time #658

Closed
3 tasks done
amyangfei opened this issue Jun 15, 2020 · 1 comment
Closed
3 tasks done
Assignees
Labels
difficulty/hard Hard task. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/P0 The issue has P0 priority.
Milestone

Comments

@amyangfei
Copy link
Contributor

amyangfei commented Jun 15, 2020

Feature Request

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

In TiCDC we provide multiple level consistency replication, including row-level ordered, table level ordered, and eventual transaction consistency. Users also pay attention to the transaction guarantee, for example

  • Can TiCDC guarantee the atomic replication of a transaction, which interacts with multiple tables?
  • Can TiCDC guarantee the atomic replication of a single table transaction?

In the current implementation of MySQL sink, multiple table transaction can't be replicated atomically, but table-level transaction atomic is supported.

What's more, in many scenarios users want to ensure the downstream is replicated to a globally consistent state, as TiCDC supports eventual transaction consistency, and TiDB supports snapshot read, we could combine these two features and provide a snapshot level consistency replication strategy.

TODO list

  • Store a safepoint mapping in downstream, recording the TSO mapping between upstream and downstream. Each two matched TSOs guarantee the same snapshot between upstream and downstream.
  • Make MySQL sink supports to replicate to a globally consistent state dynamically. (Dynamic means during the replication of TiCDC, we can acquire globally consistent state continuously)
  • Besides we should consider the possible usage scenarios of this feature.

Note this strategy only supports replicating from TiDB to TiDB.

Describe alternatives you've considered:

Currently the MySQL sink only replicates to an eventually consistent state if and only if we provide a target-ts in the changefeed, this is caused by the multiple captures and concurrent execution in MySQL sink.

Teachability, Documentation, Adoption, Migration Strategy:

Value

Value description

This feature enables TiCDC to replicate to TiDB/MySQL with eventual transaction consistency

Value score

  • (TBD) / 5

Workload estimation

  • (TBD) person-day

Time

GanttStart: 2020-09-01
GanttDue: 2020-10-31

@amyangfei amyangfei added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. feature request labels Jun 15, 2020
@amyangfei amyangfei added this to the v5.0.0 milestone Jun 23, 2020
@amyangfei amyangfei added the priority/P0 The issue has P0 priority. label Jun 23, 2020
@scsldb scsldb modified the milestones: v5.0.0-alpha, v5.0.0-beta.1 Jul 15, 2020
@IANTHEREAL IANTHEREAL changed the title TiCDC Snapshot Level Consistency Replication TiDB Cluster supports snapshot level consistency replication in time Jul 28, 2020
@amyangfei amyangfei added the difficulty/hard Hard task. label Jul 29, 2020
@amyangfei
Copy link
Contributor Author

Task closed, the overall usage scenario will be completed in #691

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/hard Hard task. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/P0 The issue has P0 priority.
Projects
None yet
Development

No branches or pull requests

2 participants