rocksdb/options
Baptiste Lemaire 9dc887ece0 Memtable "MemPurge" prototype (#8454)
Summary:
Implement an experimental feature called "MemPurge", which consists in purging "garbage" bytes out of a memtable and reuse the memtable struct instead of making it immutable and eventually flushing its content to storage.
The prototype is by default deactivated and is not intended for use. It is intended for correctness and validation testing. At the moment, the "MemPurge" feature can be switched on by using the `options.experimental_allow_mempurge` flag. For this early stage, when the allow_mempurge flag is set to `true`, all the flush operations will be rerouted to perform a MemPurge. This is a temporary design decision that will give us the time to explore meaningful heuristics to use MemPurge at the right time for relevant workloads . Moreover, the current MemPurge operation only supports `Puts`, `Deletes`, `DeleteRange` operations, and handles `Iterators` as well as `CompactionFilter`s that are invoked at flush time .
Three unit tests are added to `db_flush_test.cc` to test if MemPurge works correctly (and checks that the previously mentioned operations are fully supported thoroughly tested).
One noticeable design decision is the timing of the MemPurge operation in the memtable workflow: for this prototype, the mempurge happens when the memtable is switched (and usually made immutable). This is an inefficient process because it implies that the entirety of the MemPurge operation happens while holding the db_mutex. Future commits will make the MemPurge operation a background task (akin to the regular flush operation) and aim at drastically enhancing the performance of this operation. The MemPurge is also not fully "WAL-compatible" yet, but when the WAL is full, or when the regular MemPurge operation fails (or when the purged memtable still needs to be flushed), a regular flush operation takes place. Later commits will also correct these behaviors.

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

Reviewed By: anand1976

Differential Revision: D29433971

Pulled By: bjlemaire

fbshipit-source-id: 6af48213554e35048a7e03816955100a80a26dc5
2021-07-02 05:23:02 -07:00
..
cf_options.cc Fix Immutable Customizable Serialization (#8457) 2021-06-28 12:28:28 -07:00
cf_options.h Added static methods for simple types to OptionTypeInfo (#8249) 2021-05-11 16:15:47 -07:00
configurable_helper.h Add customizable_util.h to the public API (#8301) 2021-06-29 09:08:57 -07:00
configurable_test.cc Move RegisterOptions into the Configurable API (#8223) 2021-04-26 03:13:24 -07:00
configurable_test.h Move RegisterOptions into the Configurable API (#8223) 2021-04-26 03:13:24 -07:00
configurable.cc Fix PrepareOptions for Customizable Classes (#8468) 2021-06-30 14:09:36 -07:00
customizable_test.cc Fix PrepareOptions for Customizable Classes (#8468) 2021-06-30 14:09:36 -07:00
customizable.cc Fix PrepareOptions for Customizable Classes (#8468) 2021-06-30 14:09:36 -07:00
db_options.cc Memtable "MemPurge" prototype (#8454) 2021-07-02 05:23:02 -07:00
db_options.h Memtable "MemPurge" prototype (#8454) 2021-07-02 05:23:02 -07:00
options_helper.cc Fix Immutable Customizable Serialization (#8457) 2021-06-28 12:28:28 -07:00
options_helper.h Added static methods for simple types to OptionTypeInfo (#8249) 2021-05-11 16:15:47 -07:00
options_parser.cc Refactor: add LineFileReader and Status::MustCheck (#8026) 2021-03-09 20:12:38 -08:00
options_parser.h Bring the Configurable options together (#5753) 2020-09-14 17:01:01 -07:00
options_settable_test.cc Cache warming data blocks during flush (#8242) 2021-06-17 21:56:47 -07:00
options_test.cc Memtable "MemPurge" prototype (#8454) 2021-07-02 05:23:02 -07:00
options.cc Limit buffering for collecting samples for compression dictionary (#7970) 2021-02-19 14:09:54 -08:00