Skip to content

Commit 027d76c

Browse files
authored
fix: Protect BumpUp() from running in parallel to serialization (#4307)
* protect BumpUp() from running in parallel to serialization
1 parent 55bc981 commit 027d76c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/server/db_slice.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ OpResult<DbSlice::PrimeItAndExp> DbSlice::FindInternal(const Context& cntx, std:
468468
db.prime.CVCUponBump(change_cb_.back().first, res.it, bump_cb);
469469
}
470470

471+
block_counter_.Wait(); // We must not change the bucket's internal order during serialization
471472
auto bump_it = db.prime.BumpUp(res.it, PrimeBumpPolicy{&fetched_items_});
472473
if (bump_it != res.it) { // the item was bumped
473474
res.it = bump_it;

0 commit comments

Comments
 (0)