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

Run non-cancellation safe cluster controller leader tasks in select expression #2347

Merged

Conversation

tillrohrmann
Copy link
Contributor

To avoid losing progress, this commit runs all cluster controller leader tasks that are not cancellation safe as part of the top-level select expression instead of a select arm. Select arms can be cancelled and therefore we would lose progress in this case. This applies to trimming the logs and updating scheduler when there is a logs or partition table update.

Copy link
Contributor

@muhamadazmy muhamadazmy left a comment

Choose a reason for hiding this comment

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

The change looks good to me. Thank you so much for fixing this and identifying this dangerous pattern.

@tillrohrmann
Copy link
Contributor Author

The failing test case seems to an unstable test. See restatedev/sdk-test-suite#24 for more details.

…xpression

To avoid losing progress, this commit runs all cluster controller leader tasks that
are not cancellation safe as part of the top-level select expression instead of a
select arm. Select arms can be cancelled and therefore we would lose progress in this
case. This applies to trimming the logs and updating scheduler when there is a logs
or partition table update.
@tillrohrmann tillrohrmann merged commit 7c7b16b into restatedev:main Nov 22, 2024
3 checks passed
@tillrohrmann tillrohrmann deleted the cluster-controller-run-future branch November 22, 2024 12:34
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.

2 participants