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

Subtask tracing issue for undo based eventually consistent replication #2352

Closed
7 tasks
amyangfei opened this issue Jul 22, 2021 · 1 comment
Closed
7 tasks
Labels
subject/new-feature Denotes an issue or pull request adding a new feature.

Comments

@amyangfei
Copy link
Contributor

amyangfei commented Jul 22, 2021

Basic Design

TiCDC supports a tso-map feature, which means TiCDC can replicate data to a consistent state periodically (under the conditions that upstream TiDB is available), and persists a tso map which records a consistent state between upstream and downstream. Based on that premise, when upstream meets disaster, if we can provide a way to recover downstream to the latest TSO in tso-map, we can get an eventually consistent state in downstream.

The undo feature is built in TiCDC and reuses the ability of current TiCDC, including kv events handling, raw kv data decoding, flow control etc. Note the EventFeed API based undo in TiCDC is suitable for TiDB (>=4.0) only.

This is an alternative solution for eventually consistent replication compared to #2351

Task breakdown

8 weeks totally

  • Add a new recovery mode in TiCDC. 6weeks

    • Support to run cdc cli undo from the cli entry, including integration with the following parts. 1week
    • Refactor the puller module can run independently, including kv client management, schema management, sorter and mounter, to support pulls kv events and generate sorted row events. (looks like running a TiCDC server in the background) 3weeks
      • An alternative solution is to run a cdc server in downstream cluster, and add a new kind of replication task, which is undo task, this will reuse most of the current TiCDC logic.
    • Support to generate undo SQLs from given row events. 1week
    • Support undo sink. 1week
  • Overall test and benchmark. 2weeks

    • Combine the whole features, integration tests. 1week
    • Benchmark tests, test the RTO and RPO. 1week
  • Unified undo framework for non-TiDB. (won't do currently)

@amyangfei amyangfei added the subject/new-feature Denotes an issue or pull request adding a new feature. label Jul 22, 2021
@amyangfei
Copy link
Contributor Author

This feature won't do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subject/new-feature Denotes an issue or pull request adding a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant