rocksdb/db/db_impl
sdong 1760637539 CompactRange() refit level should confirm destination level is not empty (#7261)
Summary:
There is potential data race related CompactRange() with level refitting. After the compaction step and refitting step, some automatic compaction could put data to the destination level and cause the DB to be corrupted. Fix the bug by checking the target level to be empty.

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

Test Plan: Add a unit test, which would fail with "Corruption: L1 have overlapping ranges '666F6F' seq:6, type:1 vs. '626172' seq:2, type:1", and now it succeeds.

Reviewed By: ajkr

Differential Revision: D23142269

fbshipit-source-id: 28bc14d5ac934c192260b23a4ce3f10a95e3ee91
2020-08-17 14:21:53 -07:00
..
db_impl.cc Introduce a global StatsDumpScheduler for stats dumping (#7223) 2020-08-14 20:12:44 -07:00
db_impl.h Introduce a global StatsDumpScheduler for stats dumping (#7223) 2020-08-14 20:12:44 -07:00
db_impl_compaction_flush.cc CompactRange() refit level should confirm destination level is not empty (#7261) 2020-08-17 14:21:53 -07:00
db_impl_debug.cc Introduce a global StatsDumpScheduler for stats dumping (#7223) 2020-08-14 20:12:44 -07:00
db_impl_experimental.cc Replace reinterpret_cast with static_cast_with_check (#7067) 2020-07-02 19:25:41 -07:00
db_impl_files.cc Make env*_test work with ASSERT_STATUS_CHECKED (#7176) 2020-07-28 22:59:48 -07:00
db_impl_open.cc Introduce a global StatsDumpScheduler for stats dumping (#7223) 2020-08-14 20:12:44 -07:00
db_impl_readonly.cc Remove duplicate colon in Status message (#7041) 2020-08-06 15:18:04 -07:00
db_impl_readonly.h API change: DB::OpenForReadOnly will not write to the file system unless create_if_missing is true (#6900) 2020-06-03 18:57:49 -07:00
db_impl_secondary.cc Store FileSystemPtr object that contains FileSystem ptr (#7180) 2020-08-12 17:31:23 -07:00
db_impl_secondary.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
db_impl_write.cc Fix the potential deadlock in WriteImplWALOnly and UnorderedWriteMemtable (#7199) 2020-08-07 11:28:49 -07:00
db_secondary_test.cc More Makefile Cleanup (#7097) 2020-07-09 14:35:17 -07:00