mirror of https://github.com/facebook/rocksdb.git
Fix clang-analyzer false-positive on ldb_cmd.cc
Summary: clang-analyzer complaint about db_ being nullptr, but it couldn't be because it checks exec_stats before proceed. Add an assert to get around the false-positive. Test Plan `make analyze` Closes https://github.com/facebook/rocksdb/pull/3236 Differential Revision: D6505417 Pulled By: yiwu-arbug fbshipit-source-id: e5b65764ea994dd9e4bab3e697b97dc70dc22cab
This commit is contained in:
parent
bbef8c3884
commit
e1c569c324
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue