fix(server): mget crash on same key get (#2474)

* fix(server): mget crash on same key get

fix: #2465
the bug: on cache mode mget bumps up items. When executing mget with the same key several times i.e mget key key we will invalidate the iterator when we bump up the item in dash table.
the fix: bump up/down items only once by using bumped_items set
This PR also reverts c225113
and updates the bumped stats and bumped_items set if the item was bumped

Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
adiholden 2024-01-28 11:45:35 +02:00 committed by GitHub
parent 3ebb32df3f
commit 9f4c4353b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 62 additions and 37 deletions

View file

@ -482,7 +482,7 @@ class DbSlice {
std::vector<std::pair<uint64_t, ChangeCallback>> change_cb_;
// Used in temporary computations in Find item and CbFinish
mutable absl::flat_hash_set<CompactObjectView> bumped_items_;
mutable absl::flat_hash_set<CompactObjectView> fetched_items_;
// Registered by shard indices on when first document index is created.
DocDeletionCallback doc_del_cb_;