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

changefeed: fix add partition in old owner #2205

Merged
merged 8 commits into from
Jul 12, 2021

Conversation

amyangfei
Copy link
Contributor

What problem does this PR solve?

When TiCDC meets partition table update, the owner diffs the latest partition table information with the memory information, the new added partition and dropped partition should be calculated by

new added = Set(partition table IDs in latest table info) - Set(partition table IDs that TiCDC maintains)
dropped = Set(partition table IDs that TiCDC maintains) - Set(partition table IDs in latest table info)

The new added partition calculation is wrong, the affected version includes >=4.0.2, >=5.0.0.

5.1.0 and master are not affected.

What is changed and how it works?

Should use oldIDs as the partition table IDs that TiCDC maintains

Check List

Tests

  • Unit test
  • Integration test

Release note

  • Fix extra partition dispatching when adding new table partition.

@amyangfei amyangfei added status/ptal Could you please take a look? needs-cherry-pick-release-5.0 Should cherry pick this PR to release-5.0 branch. type/cherry-pick-for-release-4.0 This PR is cherry-picked to release-4.0 from a source PR. labels Jul 1, 2021
@amyangfei amyangfei added this to the v4.0.14 milestone Jul 1, 2021
@ti-chi-bot ti-chi-bot requested review from zier-one and overvenus July 1, 2021 15:14
@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 1, 2021
@amyangfei
Copy link
Contributor Author

/run-all-tests

@codecov-commenter
Copy link

Codecov Report

Merging #2205 (a7413c3) into release-4.0 (753073a) will decrease coverage by 0.0898%.
The diff coverage is 63.0255%.

@@                 Coverage Diff                 @@
##           release-4.0      #2205        +/-   ##
===================================================
- Coverage      53.7661%   53.6763%   -0.0899%     
===================================================
  Files              153        163        +10     
  Lines            15958      17300      +1342     
===================================================
+ Hits              8580       9286       +706     
- Misses            6475       7035       +560     
- Partials           903        979        +76     

@lonng lonng added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Jul 2, 2021
Copy link
Member

@overvenus overvenus left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 2, 2021
@amyangfei
Copy link
Contributor Author

/run-all-tests

@sre-bot
Copy link

sre-bot commented Jul 7, 2021

@amyangfei
Copy link
Contributor Author

/run-all-tests

@amyangfei amyangfei self-assigned this Jul 8, 2021
@amyangfei amyangfei added the release-blocker This issue blocks a release. Please solve it ASAP. label Jul 12, 2021
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lonng
  • overvenus

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 status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 12, 2021
@lonng
Copy link
Contributor

lonng commented Jul 12, 2021

/merge

@ti-chi-bot
Copy link
Member

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

Commit hash: 6a5633c

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 12, 2021
@amyangfei
Copy link
Contributor Author

/run-leak-tests

@ti-chi-bot ti-chi-bot merged commit 93ed6dc into pingcap:release-4.0 Jul 12, 2021
@amyangfei amyangfei deleted the fix-add-partition branch July 12, 2021 06:03
ti-chi-bot pushed a commit to ti-chi-bot/tiflow that referenced this pull request Jul 12, 2021
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #2263.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Cherry pick PR approved by release team. needs-cherry-pick-release-5.0 Should cherry pick this PR to release-5.0 branch. release-blocker This issue blocks a release. Please solve it ASAP. 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. status/ptal Could you please take a look? type/cherry-pick-for-release-4.0 This PR is cherry-picked to release-4.0 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants