aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/db/db_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/leveldb/db/db_impl.cc')
-rw-r--r--src/leveldb/db/db_impl.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leveldb/db/db_impl.cc b/src/leveldb/db/db_impl.cc
index 90c1c811d8..c9de169f29 100644
--- a/src/leveldb/db/db_impl.cc
+++ b/src/leveldb/db/db_impl.cc
@@ -609,7 +609,11 @@ void DBImpl::BackgroundCall() {
assert(bg_compaction_scheduled_);
if (!shutting_down_.Acquire_Load()) {
Status s = BackgroundCompaction();
- if (!s.ok()) {
+ if (s.ok()) {
+ // Success
+ } else if (shutting_down_.Acquire_Load()) {
+ // Error most likely due to shutdown; do not wait
+ } else {
// Wait a little bit before retrying background compaction in
// case this is an environmental problem and we do not want to
// chew up resources for failed compactions for the duration of