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

latency(cdc): fix ddl does not execute caused by incorrect checkpoint calculation #5761

Merged
merged 7 commits into from
Jun 8, 2022

Conversation

3AceShowHand
Copy link
Contributor

@3AceShowHand 3AceShowHand commented Jun 6, 2022

What problem does this PR solve?

Issue Number: close #4757

What is changed and how it works?

coordinator should not return checkpointCannotProceed if there is no table.

Check List

Tests

  • Unit test

Questions

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

Release note

`None`

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has not been approved.

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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 6, 2022
@3AceShowHand 3AceShowHand self-assigned this Jun 6, 2022
@ti-chi-bot ti-chi-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 7, 2022
@ti-chi-bot ti-chi-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 7, 2022
@ti-chi-bot ti-chi-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 8, 2022
@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jun 8, 2022
@3AceShowHand 3AceShowHand changed the title [DNM] latency(cdc): fix ddl does not execute caused by incorrect checkpoint calculation latency(cdc): fix ddl does not execute caused by incorrect checkpoint calculation Jun 8, 2022
@3AceShowHand 3AceShowHand requested a review from overvenus June 8, 2022 03:13
@codecov-commenter
Copy link

codecov-commenter commented Jun 8, 2022

Codecov Report

❗ No coverage uploaded for pull request base (fb/latency@0b10d98). Click here to learn what that means.
The diff coverage is n/a.

Flag Coverage Δ
cdc 62.6596% <0.0000%> (?)
dm 51.9966% <0.0000%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

@@               Coverage Diff               @@
##             fb/latency      #5761   +/-   ##
===============================================
  Coverage              ?   57.0187%           
===============================================
  Files                 ?        687           
  Lines                 ?      80684           
  Branches              ?          0           
===============================================
  Hits                  ?      46005           
  Misses                ?      30434           
  Partials              ?       4245           

@ti-chi-bot ti-chi-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 8, 2022
@3AceShowHand 3AceShowHand force-pushed the fix-ddl-does-not-execute branch from c088531 to c85e27b Compare June 8, 2022 03:43
@ti-chi-bot ti-chi-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 8, 2022
@@ -376,25 +376,21 @@ func (r *replicationManager) AdvanceCheckpoint(
currentTables []model.TableID,
) (newCheckpointTs, newResolvedTs model.Ts) {
newCheckpointTs, newResolvedTs = math.MaxUint64, math.MaxUint64
Copy link
Member

Choose a reason for hiding this comment

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

Can we return the current checkpoint if there is no table?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would prefer the current implementation.

If the current checkpoint is less than barrierTs, barrier won't be hit to take effect.

@overvenus overvenus merged commit 06ac00f into pingcap:fb/latency Jun 8, 2022
overvenus pushed a commit to overvenus/ticdc that referenced this pull request Jun 21, 2022
… calculation (pingcap#5761)

* fix tp advance checkpoint.
* fix ddl sink log.
* add a ut for replication manager advance checkpoint ts.
overvenus pushed a commit to overvenus/ticdc that referenced this pull request Jun 21, 2022
… calculation (pingcap#5761)

* fix tp advance checkpoint.
* fix ddl sink log.
* add a ut for replication manager advance checkpoint ts.
overvenus pushed a commit to overvenus/ticdc that referenced this pull request Jun 23, 2022
… calculation (pingcap#5761)

* fix tp advance checkpoint.
* fix ddl sink log.
* add a ut for replication manager advance checkpoint ts.
overvenus pushed a commit to overvenus/ticdc that referenced this pull request Jun 23, 2022
… calculation (pingcap#5761)

* fix tp advance checkpoint.
* fix ddl sink log.
* add a ut for replication manager advance checkpoint ts.
overvenus pushed a commit to overvenus/ticdc that referenced this pull request Jun 24, 2022
… calculation (pingcap#5761)

* fix tp advance checkpoint.
* fix ddl sink log.
* add a ut for replication manager advance checkpoint ts.
overvenus pushed a commit to overvenus/ticdc that referenced this pull request Jun 24, 2022
… calculation (pingcap#5761)

* fix tp advance checkpoint.
* fix ddl sink log.
* add a ut for replication manager advance checkpoint ts.
overvenus pushed a commit to overvenus/ticdc that referenced this pull request Jun 24, 2022
… calculation (pingcap#5761)

* fix tp advance checkpoint.
* fix ddl sink log.
* add a ut for replication manager advance checkpoint ts.
overvenus pushed a commit to overvenus/ticdc that referenced this pull request Jun 24, 2022
… calculation (pingcap#5761)

* fix tp advance checkpoint.
* fix ddl sink log.
* add a ut for replication manager advance checkpoint ts.
ti-chi-bot pushed a commit that referenced this pull request Jun 24, 2022
… calculation (#5761)

* fix tp advance checkpoint.
* fix ddl sink log.
* add a ut for replication manager advance checkpoint ts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants