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

statement-distribution: Ensure we deactivate leaves before activating #3042

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Jan 24, 2024

As activation can fail, we ensure that we don't miss deactivation of leaves.

As activation can fail, we ensure that we don't miss deactivation of leaves.
@bkchr bkchr added the R0-silent Changes should not be mentioned in any release notes label Jan 24, 2024
@bkchr bkchr enabled auto-merge January 24, 2024 10:59
@bkchr bkchr added this pull request to the merge queue Jan 24, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 24, 2024
@bkchr bkchr added this pull request to the merge queue Jan 24, 2024
Merged via the queue into master with commit a989ddf Jan 24, 2024
125 of 128 checks passed
@bkchr bkchr deleted the bkchr-ensure-we-deactivate-leaf branch January 24, 2024 13:58
v2::handle_deactivate_leaves(state, &deactivated);
v2::handle_active_leaves_update(ctx, state, activated, mode).await?;
Copy link
Contributor

Choose a reason for hiding this comment

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

This may cause issues as ordering was somewhat sensitive here.

Reference counts for active leaves may drop to zero and then be incremented back to 1 again. It would be more reliable to just ensure that we handle_deactivate_leaves even if handle_active_leaves_update fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants