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

fix: Protect BumpUp() from running in parallel to serialization #4307

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

chakaz
Copy link
Collaborator

@chakaz chakaz commented Dec 13, 2024

Fixes #4306

@@ -468,6 +468,7 @@ OpResult<DbSlice::PrimeItAndExp> DbSlice::FindInternal(const Context& cntx, std:
db.prime.CVCUponBump(change_cb_.back().first, res.it, bump_cb);
}

block_counter_.Wait(); // We must not change the bucket's internal order during serialization
Copy link
Collaborator

Choose a reason for hiding this comment

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

not related to this PR but block_counter_ is not a good name because it does not say much about the semantics of the variable.

@chakaz chakaz requested a review from kostasrim December 13, 2024 07:10
@@ -468,6 +468,7 @@ OpResult<DbSlice::PrimeItAndExp> DbSlice::FindInternal(const Context& cntx, std:
db.prime.CVCUponBump(change_cb_.back().first, res.it, bump_cb);
}

block_counter_.Wait(); // We must not change the bucket's internal order during serialization
Copy link
Contributor

Choose a reason for hiding this comment

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

I would have to moved it to line 463 such that the whole block (including the capture version change) is atomic but it should be fine this way as well

Copy link
Contributor

Choose a reason for hiding this comment

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

I am merging this because I want the tests to run with this flag over the weekend

@kostasrim kostasrim merged commit 027d76c into main Dec 13, 2024
9 checks passed
@kostasrim kostasrim deleted the chakaz/bump-yield branch December 13, 2024 09:06
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.

Missed replication items in cache_mode full sync
3 participants