rocksdb/utilities/write_batch_with_index
Changyu Bi 1c7652fcef Introduce a WriteBatchWithIndex-based implementation of ReadOnlyMemTable (#13123)
Summary:
introduce the class WBWIMemTable that implements ReadOnlyMemTable interface with data stored in a WriteBatchWithIndex object.

This PR implements the main read path: Get, MultiGet and Iterator. It only supports Put, Delete and SingleDelete operations for now. All the keys in the WBWIMemTable will be assigned a global sequence number through WBWIMemTable::SetGlobalSequenceNumber().

Planned follow up PRs:
- Create WBWIMemTable with a transaction's WBWI and ingest it into a DB during Transaction::Commit()
- Support for Merge. This will be more complicated since we can have multiple updates with the same user key for Merge.
- Support for other operations like WideColumn and other ReadOnlyMemTable methods.

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

Test Plan: * A mini-stress test for the read path is added as a new unit test

Reviewed By: jowlyzhang

Differential Revision: D65633419

Pulled By: cbi42

fbshipit-source-id: 0684fe47260b41f51ca39c300eb72ca5bc9c5a3b
2024-11-12 09:27:11 -08:00
..
write_batch_with_index.cc Introduce a WriteBatchWithIndex-based implementation of ReadOnlyMemTable (#13123) 2024-11-12 09:27:11 -08:00
write_batch_with_index_internal.cc Make BaseDeltaIterator honor allow_unprepared_value (#13111) 2024-11-01 14:10:18 -07:00
write_batch_with_index_internal.h Make BaseDeltaIterator honor allow_unprepared_value (#13111) 2024-11-01 14:10:18 -07:00
write_batch_with_index_test.cc Introduce a WriteBatchWithIndex-based implementation of ReadOnlyMemTable (#13123) 2024-11-12 09:27:11 -08:00