Skip to content

Commit 8438a19

Browse files
author
Feng Zhu
committed
fix dropping column family bug
Summary: 1. db/db_impl.cc:2324 (DBImpl::BackgroundCompaction) should not raise bg_error_ when column family is dropped during compaction. Test Plan: 1. db_stress Reviewers: ljin, yhchiang, dhruba, igor, sdong Reviewed By: igor Subscribers: leveldb Differential Revision: https://reviews.facebook.net/D22653
1 parent 076bd01 commit 8438a19

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

db/db_impl.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2321,7 +2321,7 @@ Status DBImpl::BackgroundCompaction(bool* madeProgress,
23212321

23222322
if (status.ok()) {
23232323
// Done
2324-
} else if (shutting_down_.Acquire_Load()) {
2324+
} else if (status.IsShutdownInProgress()) {
23252325
// Ignore compaction errors found during shutting down
23262326
} else {
23272327
Log(InfoLogLevel::WARN_LEVEL, options_.info_log, "Compaction error: %s",

include/rocksdb/status.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class Status {
9696
// Returns true iff the status indicates Incomplete
9797
bool IsIncomplete() const { return code() == kIncomplete; }
9898

99-
// Returns true iff the status indicates Incomplete
99+
// Returns true iff the status indicates Shutdown In progress
100100
bool IsShutdownInProgress() const { return code() == kShutdownInProgress; }
101101

102102
bool IsTimedOut() const { return code() == kTimedOut; }

0 commit comments

Comments
 (0)