From 027d76c13d7d03cdb481b4043ea5c099e85e400f Mon Sep 17 00:00:00 2001 From: Shahar Mike Date: Fri, 13 Dec 2024 11:06:31 +0200 Subject: [PATCH] fix: Protect `BumpUp()` from running in parallel to serialization (#4307) * protect BumpUp() from running in parallel to serialization --- src/server/db_slice.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server/db_slice.cc b/src/server/db_slice.cc index f9d65f447..88f18696b 100644 --- a/src/server/db_slice.cc +++ b/src/server/db_slice.cc @@ -468,6 +468,7 @@ OpResult 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;