diff --git a/db/column_family.cc b/db/column_family.cc index 290283608..1611125cd 100644 --- a/db/column_family.cc +++ b/db/column_family.cc @@ -1306,6 +1306,10 @@ Env::WriteLifeTimeHint ColumnFamilyData::CalculateSSTWriteHint(int level) { // L1: medium, L2: long, ... if (level - base_level >= 2) { return Env::WLTH_EXTREME; + } else if (level < base_level) { + // There is no restriction which prevents level passed in to be smaller + // than base_level. + return Env::WLTH_MEDIUM; } return static_cast(level - base_level + static_cast(Env::WLTH_MEDIUM));