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 resouce cleanup when an owner exits #528

Merged
merged 7 commits into from
May 8, 2020

Conversation

amyangfei
Copy link
Contributor

@amyangfei amyangfei commented May 1, 2020

What problem does this PR solve?

Fix #523

What is changed and how it works?

  • remove the panic mechanism in capture, just return the Suicide error when etcd session is done.
  • make campaignOwnerLoop as a background routine, in most failure cases (including err compacted, s.capture.Campaign failed, owner Run failed), we don't return error directly, just run another campaign loop

Check List

Tests

  • Unit test
  • Integration test

Release Note

  • Fix owner may not run the main work loop because some errors are not handled correctly.

@amyangfei amyangfei added the subject/ha Denotes an issue or pull request is related to high availability. label May 1, 2020
@amyangfei
Copy link
Contributor Author

/run-integration-tests

@amyangfei amyangfei added the status/ptal Could you please take a look? label May 1, 2020
@amyangfei
Copy link
Contributor Author

/run-integration-tests

1 similar comment
@amyangfei
Copy link
Contributor Author

/run-integration-tests

@amyangfei amyangfei added LGT1 and removed status/ptal Could you please take a look? labels May 7, 2020
@zier-one
Copy link
Contributor

zier-one commented May 8, 2020

LGTM

@sre-bot
Copy link

sre-bot commented May 8, 2020

@zier-one zier-one added LGT2 and removed LGT1 labels May 8, 2020
@amyangfei amyangfei merged commit 5a4070c into pingcap:master May 8, 2020
@amyangfei amyangfei deleted the fix-owner-step-down branch May 8, 2020 06:26
5kbpers pushed a commit to 5kbpers/ticdc that referenced this pull request Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subject/ha Denotes an issue or pull request is related to high availability.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

owner mainloop doesn't handle error correctly
4 participants