-
Notifications
You must be signed in to change notification settings - Fork 286
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
Conversation
/run-all-tests |
/run-all-tests |
/run-kafka-tests |
return cerror.ErrOwnerCampaignKeyDeleted.GenWithStackByArgs() | ||
} | ||
restart: | ||
wch := o.etcdClient.Client.Watch(ctx, key, clientv3.WithRev(resp.Header.Revision+1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why +1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change with revision resp.Header.Revision
is not needed, so +1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some comments?
LGTM |
/merge |
/run-all-tests |
@amyangfei merge failed. |
/run-kafka-tests |
/merge |
Your auto merge job has been accepted, waiting for:
|
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
@amyangfei merge failed. |
/run-all-tests |
/run-integration-tests |
@amyangfei merge failed. |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #1104 |
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
Release note