aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/db/db_impl.cc
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-12-12 02:17:17 +0100
committerGavin Andresen <gavinandresen@gmail.com>2013-01-23 10:41:44 -0500
commit4786302fb99f930afca1e778255b72c6999ca480 (patch)
tree8c92a473f0c8772d152561d909fedce4b8ed5d2f /src/leveldb/db/db_impl.cc
parentc429f2b062140843f42b78d70278279c6be74441 (diff)
Replace leveldb/ with vanilla 1.7.0
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