mirror of https://github.com/facebook/rocksdb.git
ac24f152a1
Summary: This is setting up for a fix to a data race in SetOptions on BlockBasedTableOptions (BBTO), https://github.com/facebook/rocksdb/issues/10079 The race will be fixed by replacing `table_factory` with a modified copy whenever we want to modify a BBTO field. An argument could be made that this change creates more entaglement between features (e.g. BlobSource <-> MutableCFOptions), rather than (conceptually) minimizing the dependencies of each feature, but * Most of these things already depended on ImmutableOptions * Historically there has been a lot of plumbing (and possible small CPU overhead) involved in adding features that need to reach a lot of places, like `block_protection_bytes_per_key`. Keeping those wrapped up in options simplifies that. * SuperVersion management generally takes care of lifetime management of MutableCFOptions, so is not that difficult. (Crash test agrees so far.) There are some FIXME places where it is known to be unsafe to replace `block_cache` unless/until we handle shared_ptr tracking properly. HOWEVER, replacing `block_cache` is generally dubious, at least while existing users of the old block cache (e.g. table readers) can continue indefinitely. The change to cf_options.cc is essentially just moving code (not changing). I'm not concerned about the performance of copying another shared_ptr with MutableCFOptions, but I left a note about considering an improvement if more shared_ptr are added to it. Pull Request resolved: https://github.com/facebook/rocksdb/pull/13077 Test Plan: existing tests, crash test. Unit test DBOptionsTest.GetLatestCFOptions updated with some temporary logic. MemoryTest required some refactoring (simplification) for the change. Reviewed By: cbi42 Differential Revision: D64546903 Pulled By: pdillinger fbshipit-source-id: 69ae97ce5cf4c01b58edc4c5d4687eb1e5bf5855 |
||
---|---|---|
.. | ||
blob_constants.h | ||
blob_contents.cc | ||
blob_contents.h | ||
blob_counting_iterator.h | ||
blob_counting_iterator_test.cc | ||
blob_fetcher.cc | ||
blob_fetcher.h | ||
blob_file_addition.cc | ||
blob_file_addition.h | ||
blob_file_addition_test.cc | ||
blob_file_builder.cc | ||
blob_file_builder.h | ||
blob_file_builder_test.cc | ||
blob_file_cache.cc | ||
blob_file_cache.h | ||
blob_file_cache_test.cc | ||
blob_file_completion_callback.h | ||
blob_file_garbage.cc | ||
blob_file_garbage.h | ||
blob_file_garbage_test.cc | ||
blob_file_meta.cc | ||
blob_file_meta.h | ||
blob_file_reader.cc | ||
blob_file_reader.h | ||
blob_file_reader_test.cc | ||
blob_garbage_meter.cc | ||
blob_garbage_meter.h | ||
blob_garbage_meter_test.cc | ||
blob_index.h | ||
blob_log_format.cc | ||
blob_log_format.h | ||
blob_log_sequential_reader.cc | ||
blob_log_sequential_reader.h | ||
blob_log_writer.cc | ||
blob_log_writer.h | ||
blob_read_request.h | ||
blob_source.cc | ||
blob_source.h | ||
blob_source_test.cc | ||
db_blob_basic_test.cc | ||
db_blob_compaction_test.cc | ||
db_blob_corruption_test.cc | ||
db_blob_index_test.cc | ||
prefetch_buffer_collection.cc | ||
prefetch_buffer_collection.h |