diff --git a/tools/ldb_cmd.cc b/tools/ldb_cmd.cc index 5c9f363a7..56590161a 100644 --- a/tools/ldb_cmd.cc +++ b/tools/ldb_cmd.cc @@ -1689,6 +1689,7 @@ void ReduceDBLevelsCommand::DoCommand() { if (exec_state_.IsFailed()) { return; } + assert(db_ != nullptr); // Compact the whole DB to put all files to the highest level. fprintf(stdout, "Compacting the db...\n"); db_->CompactRange(CompactRangeOptions(), GetCfHandle(), nullptr, nullptr);