ae82d91492
Summary: 1) In case of non-TransactionDB and avoid_flush_during_recovery = true, RocksDB won't flush the data from WAL to L0 for all column families if possible. As a result, not all column families can increase their log_numbers, and min_log_number_to_keep won't change. 2) For transaction DB (.allow_2pc), even with the flush, there may be old WAL files that it must not delete because they can contain data of uncommitted transactions and min_log_number_to_keep won't change. If we persist a new MANIFEST with advanced log_numbers for some column families, then during a second crash after persisting the MANIFEST, RocksDB will see some column families' log_numbers larger than the corrupted wal, and the "column family inconsistency" error will be hit, causing recovery to fail. As a solution, 1. the corrupted WALs whose numbers are larger than the corrupted wal and smaller than the new WAL will be moved to archive folder. 2. Currently, RocksDB DB::Open() may creates and writes to two new MANIFEST files even before recovery succeeds. This PR buffers the edits in a structure and writes to a new MANIFEST after recovery is successful Pull Request resolved: https://github.com/facebook/rocksdb/pull/9634 Test Plan: 1. Added new unit tests 2. make crast_test -j Reviewed By: riversand963 Differential Revision: D34463666 Pulled By: akankshamahajan15 fbshipit-source-id: e233d3af0ed4e2028ca0cf051e5a334a0fdc9d19 |
||
---|---|---|
.. | ||
file_read_sample.h | ||
histogram_test.cc | ||
histogram_windowing.cc | ||
histogram_windowing.h | ||
histogram.cc | ||
histogram.h | ||
in_memory_stats_history.cc | ||
in_memory_stats_history.h | ||
instrumented_mutex.cc | ||
instrumented_mutex.h | ||
iostats_context_imp.h | ||
iostats_context_test.cc | ||
iostats_context.cc | ||
perf_context_imp.h | ||
perf_context.cc | ||
perf_level_imp.h | ||
perf_level.cc | ||
perf_step_timer.h | ||
persistent_stats_history.cc | ||
persistent_stats_history.h | ||
statistics_test.cc | ||
statistics.cc | ||
statistics.h | ||
stats_history_test.cc | ||
thread_status_impl.cc | ||
thread_status_updater_debug.cc | ||
thread_status_updater.cc | ||
thread_status_updater.h | ||
thread_status_util_debug.cc | ||
thread_status_util.cc | ||
thread_status_util.h |