mirror of https://github.com/facebook/rocksdb.git
d010b02e86
Summary: In follow-up to https://github.com/facebook/rocksdb/issues/11922, fix a race in functions like CreateColumnFamily and SetDBOptions where the DB reports one option setting but a different one is left in effect. To fix, we can add an extra mutex around these rare operations. We don't want to hold the DB mutex during I/O or other slow things because of the many purposes it serves, but a mutex more limited to these cases should be fine. I believe this would fix a write-write race in https://github.com/facebook/rocksdb/issues/10079 but not the read-write race. Intended follow-up to this: * Should be able to remove write thread synchronization from DBImpl::WriteOptionsFile Pull Request resolved: https://github.com/facebook/rocksdb/pull/11929 Test Plan: Added two mini-stress style regression tests that fail with >1% probability before this change: DBOptionsTest::SetStatsDumpPeriodSecRace ColumnFamilyTest::CreateAndDropPeriodicRace I haven't reproduced such an inconsistency between in-memory options and on disk latest options, but this change at least improves safety and adds a test anyway: DBOptionsTest::SetStatsDumpPeriodSecRace Reviewed By: ajkr Differential Revision: D50024506 Pulled By: pdillinger fbshipit-source-id: 1e99a9ed4d96fdcf3ac5061ec6b3cee78aecdda4 |
||
---|---|---|
.. | ||
file_read_sample.h | ||
histogram.cc | ||
histogram.h | ||
histogram_test.cc | ||
histogram_windowing.cc | ||
histogram_windowing.h | ||
in_memory_stats_history.cc | ||
in_memory_stats_history.h | ||
instrumented_mutex.cc | ||
instrumented_mutex.h | ||
iostats_context.cc | ||
iostats_context_imp.h | ||
iostats_context_test.cc | ||
perf_context.cc | ||
perf_context_imp.h | ||
perf_level.cc | ||
perf_level_imp.h | ||
perf_step_timer.h | ||
persistent_stats_history.cc | ||
persistent_stats_history.h | ||
statistics.cc | ||
statistics_impl.h | ||
statistics_test.cc | ||
stats_history_test.cc | ||
thread_status_impl.cc | ||
thread_status_updater.cc | ||
thread_status_updater.h | ||
thread_status_updater_debug.cc | ||
thread_status_util.cc | ||
thread_status_util.h | ||
thread_status_util_debug.cc |