mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-25 22:44:05 +00:00
Fix universal compaction bug
Summary:
this value ``` Compaction::is_trivial_move_ ``` uninitialized .
under universal compaction , we enable ``` CompactionOptionsUniversal::allow_trivial_move ``` ,
9b11d4345a/db/compaction.cc (L245)
here is a disastrous bug , some sst trivial move to target level without overlap check ...
THEN , DATABASE DAMAGED , WE GOT A LEVEL WITH OVERLAP !
Closes https://github.com/facebook/rocksdb/pull/2634
Differential Revision: D5530722
Pulled By: siying
fbshipit-source-id: 425ab55bca5967110377d634258360bcf88c200e
This commit is contained in:
parent
6a36b3a7b9
commit
3218edc573
|
@ -169,6 +169,7 @@ Compaction::Compaction(VersionStorageInfo* vstorage,
|
||||||
bottommost_level_(IsBottommostLevel(output_level_, vstorage, inputs_)),
|
bottommost_level_(IsBottommostLevel(output_level_, vstorage, inputs_)),
|
||||||
is_full_compaction_(IsFullCompaction(vstorage, inputs_)),
|
is_full_compaction_(IsFullCompaction(vstorage, inputs_)),
|
||||||
is_manual_compaction_(_manual_compaction),
|
is_manual_compaction_(_manual_compaction),
|
||||||
|
is_trivial_move_(false),
|
||||||
compaction_reason_(_compaction_reason) {
|
compaction_reason_(_compaction_reason) {
|
||||||
MarkFilesBeingCompacted(true);
|
MarkFilesBeingCompacted(true);
|
||||||
if (is_manual_compaction_) {
|
if (is_manual_compaction_) {
|
||||||
|
|
Loading…
Reference in a new issue