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

Correct the implemention of drainer mysql checkpoint #889

Open
IANTHEREAL opened this issue Feb 4, 2020 · 0 comments
Open

Correct the implemention of drainer mysql checkpoint #889

IANTHEREAL opened this issue Feb 4, 2020 · 0 comments
Labels
feature-request This issue is a feature request

Comments

@IANTHEREAL
Copy link
Collaborator

Feature Request

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

There are some problems with implemention of drainer mysql checkpoint, one mysql checkpoint example:

mysql> select * from tidb_binlog.checkpoint;
+---------------------+---------------------------------------------------------------------------------------------------------+
| clusterID           | checkPoint                                                                                              |
+---------------------+---------------------------------------------------------------------------------------------------------+
| 6782769820199954307 | {"commitTS":413989456971300865,"ts-map":{"master-ts":413989358457585669,"slave-ts":413989440066945029}} |
| 6782784420681659503 | {"commitTS":414399178233348097,"ts-map":{"master-ts":414398077844324967,"slave-ts":414398082560032770}} |
+---------------------+---------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec

there're two columns in checkpoint table

  • clusterID which is primary key
  • checkpoint which contain the specific checkpoint value
    , and clusterID is fetched from PD service of theupstream tidb cluster

the implementation brings three problems:

  • how to fetch clusterID while the upstream cluster is completely down
  • if user want to deplay multiple drainer to replicate different tables from one upstream tidb cluster to the same downstream, they must specify different checkpoint schema and table. It's unreasonable, and user can't always figure out the weird logic

Describe the feature you'd like:

maybe we let user to specify the node-id for every drainer, and store node-id into checkpoint

@IANTHEREAL IANTHEREAL added the feature-request This issue is a feature request label Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request This issue is a feature request
Projects
None yet
Development

No branches or pull requests

1 participant