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

Remove infinite retry policy when announcing the leadership #2346

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tillrohrmann
Copy link
Contributor

Instead of retrying infinitely in the LeadershipState, we are now spawning a
background appender and hand the announce leadership message over. Additionally,
we are now monitoring the health of the appender task to escalate potential
failures which would then result in shutting the PP down and let the PPM handle
the situation.

This fixes #2333.

The second commit is only moving code into separate modules.

Instead of retrying infinitely in the LeadershipState, we are now spawning a
background appender and hand the announce leadership message over. Additionally,
we are now monitoring the health of the appender task to escalate potential
failures which would then result in shutting the PP down and let the PPM handle
the situation.

This fixes restatedev#2333.
This commit moves the LeaderState and the SelfProposer into their
own modules in order to make the leadership module easier to reason
about.
This commit fixes the problem where the run future of the LeaderState was
losing action effects if handle_action_effects would be awaiting and another
tokio::select arm would trigger in the PP event loop. The solution is to
pass the action effects back to the PP event loop and then handle them in
the select arm.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace infinite retries with writing to background appender when announcing leadership
1 participant