rocksdb/memtable
anand76 03bded03b4 Fix finger.prev_[0] assertion failure in MultiGet finger search (#14465)
Summary:
The callback loop in InlineSkipList::MultiGet updated finger.prev_[0] as it walked forward through entries (e.g., merge operands). When the MultiGet batch contained duplicate user keys, the next lookup for the same key would find finger.prev_[0] pointing to an entry that sorts AFTER the lookup key in internal key order (because the lookup key has a high sequence number which sorts first), violating the FindSpliceForLevel precondition: before == head_ || KeyIsAfterNode(key, before).

Fix: stop updating finger.prev_[0] in the callback loop. Only finger.next_[0] needs advancing to track the walk-forward position. The prev_[0] from FindGreaterOrEqualWithFinger is always a valid lower bound for any subsequent key, whether it uses kMaxSequenceNumber or a snapshot sequence number.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/14465

Reviewed By: xingbowang

Differential Revision: D96882549

Pulled By: anand1976

fbshipit-source-id: a733fa9d4f23f8b55a027c257a114c4cf35abe2b
2026-03-17 09:57:24 -07:00
..
alloc_tracker.cc internal_repo_rocksdb (-8794174668376270091) (#12114) 2023-12-01 11:10:30 -08:00
hash_linklist_rep.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
hash_skiplist_rep.cc Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
inlineskiplist.h Fix finger.prev_[0] assertion failure in MultiGet finger search (#14465) 2026-03-17 09:57:24 -07:00
inlineskiplist_test.cc Fix finger.prev_[0] assertion failure in MultiGet finger search (#14465) 2026-03-17 09:57:24 -07:00
memtablerep_bench.cc Standardize on clang-format version 18 (#13233) 2024-12-19 10:58:40 -08:00
skiplist.h Clarify/rename atomic wrapper stuff + blog post (#14213) 2026-01-05 20:47:46 -08:00
skiplist_test.cc Prefer static_cast in place of most reinterpret_cast (#12308) 2024-02-07 10:44:11 -08:00
skiplistrep.cc Add memtable MultiGet finger search optimization (#14428) 2026-03-16 10:45:49 -07:00
stl_wrappers.h Run clang format against files under example/, memory/ and memtable/ folders (#10893) 2022-10-28 13:16:50 -07:00
vectorrep.cc Add option to validate key during seek in SkipList Memtable (#13902) 2025-09-18 16:15:50 -07:00
wbwi_memtable.cc Fix uninitialized use in WBWIMemTable::Get (#13486) 2025-03-25 10:56:25 -07:00
wbwi_memtable.h Experimental API IngestWriteBatchWithIndex() (#13550) 2025-04-17 12:06:40 -07:00
write_buffer_manager.cc Add SetAllowStall() (#11335) 2023-03-30 09:43:33 -07:00
write_buffer_manager_test.cc Put Cache and CacheWrapper in new public header (#11192) 2023-02-09 12:12:02 -08:00