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

dm: fix checkpoint not updated when last event is ddl and skipped #8193

Merged
merged 8 commits into from
Feb 8, 2023

Conversation

D3Hunter
Copy link
Contributor

@D3Hunter D3Hunter commented Feb 8, 2023

What problem does this PR solve?

Issue Number: close #8175

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

fix checkpoint not updated when last event is ddl and skipped

@D3Hunter D3Hunter added the area/dm Issues or PRs related to DM. label Feb 8, 2023
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Feb 8, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • buchuitoudegou
  • maxshuang

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. labels Feb 8, 2023
@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 8, 2023
@D3Hunter D3Hunter changed the title dm: fix checkpoint not updated when last ddl is skipped dm: fix checkpoint not updated when last event is ddl and skipped Feb 8, 2023
@D3Hunter
Copy link
Contributor Author

D3Hunter commented Feb 8, 2023

/run-all-tests

@D3Hunter
Copy link
Contributor Author

D3Hunter commented Feb 8, 2023

/run-all-tests

dm/syncer/ddl.go Outdated
// - ddls related to db/table which is filtered
// for those ddls we still flush job like non-skipped ddls, so we can set global checkpoint.
// then checkpoint can match master position if skipped ddl is the last binlog in source db
if err := ddl.flushJobs(); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit concerned that it will cause DML replication concurrency drop, because we will let block-list tables' DDL clear DML queue. Can we only record the location, and wait for a heartbeat event (idle for 30s) to update the sync state?

Copy link
Contributor Author

@D3Hunter D3Hunter Feb 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not safe to update global point before dml is synced if worker failover in the middle

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@D3Hunter
Copy link
Contributor Author

D3Hunter commented Feb 8, 2023

/run-dm-integration-test
/run-verify

@D3Hunter
Copy link
Contributor Author

D3Hunter commented Feb 8, 2023

/run-dm-integration-test

@D3Hunter
Copy link
Contributor Author

D3Hunter commented Feb 8, 2023

/run-all-tests

@D3Hunter
Copy link
Contributor Author

D3Hunter commented Feb 8, 2023

/run-engine-integration-test

Copy link
Contributor

@buchuitoudegou buchuitoudegou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest lgtm

dm/syncer/ddl.go Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Feb 8, 2023
Co-authored-by: Obliviate <756541536@qq.com>
@D3Hunter
Copy link
Contributor Author

D3Hunter commented Feb 8, 2023

/run-all-tests

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Feb 8, 2023
@D3Hunter
Copy link
Contributor Author

D3Hunter commented Feb 8, 2023

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 0729f9f

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 8, 2023
@D3Hunter
Copy link
Contributor Author

D3Hunter commented Feb 8, 2023

/run-verify

@ti-chi-bot
Copy link
Member

@D3Hunter: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

trigger some heavy tests which will not run always when PR updated.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@D3Hunter
Copy link
Contributor Author

D3Hunter commented Feb 8, 2023

/run-engine-integration-test

@D3Hunter
Copy link
Contributor Author

D3Hunter commented Feb 8, 2023

/run-dm-integration-test
/run-verify

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.1: #8202.

ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Feb 8, 2023
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #8203.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dm Issues or PRs related to DM. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DM task not in synced status after import full data with lighting physical backend
5 participants