1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00

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

* protect BumpUp() from running in parallel to serialization
This commit is contained in:
Shahar Mike 2024-12-13 11:06:31 +02:00 committed by GitHub
parent 55bc981a7e
commit 027d76c13d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
auto bump_it = db.prime.BumpUp(res.it, PrimeBumpPolicy{&fetched_items_});
if (bump_it != res.it) { // the item was bumped
res.it = bump_it;