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

owner: fix multiple owners exist when owner campaign key is deleted (#1072) #1104

Merged
merged 1 commit into from
Nov 20, 2020

Conversation

ti-srebot
Copy link
Contributor

cherry-pick #1072 to release-4.0


What problem does this PR solve?

Fix https://github.com/pingcap/ticdc/issues/1044

In some cases, if the campaign owner key is deleted, the owner itself doesn't aware of it and continues running the owner routines. While at the same time, another capture will campaign to be the new owner. In this scenario, multiple owners could exist.

What is changed and how it works?

Add a background campaign key watcher in the owner background.

Check List

Tests

  • Unit test
  • Integration test

Release note

  • Fix the bug that multiple owners could exist when owner campaign key is deleted

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@amyangfei
Copy link
Contributor

/run-all-tests

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (release-4.0@a5a6dec). Click here to learn what that means.
The diff coverage is n/a.

@@               Coverage Diff                @@
##             release-4.0      #1104   +/-   ##
================================================
  Coverage               ?   36.5817%           
================================================
  Files                  ?        109           
  Lines                  ?      11380           
  Branches               ?          0           
================================================
  Hits                   ?       4163           
  Misses                 ?       6793           
  Partials               ?        424           

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-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 19, 2020
@amyangfei amyangfei merged commit 5cc9f7f into pingcap:release-4.0 Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT1 Indicates that a PR has LGTM 1. status/ptal Could you please take a look? type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants