From dad425562f168d7f9b47d859cf94b5dafc05e29a Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Tue, 12 Nov 2013 10:07:55 -0800 Subject: [PATCH] Move the comment Summary: Moving the comment per @haobo suggestion. Test Plan: No Reviewers: haobo Reviewed By: haobo CC: leveldb, haobo Differential Revision: https://reviews.facebook.net/D14019 --- db/db_impl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index 2f94303c6..502d1a0d1 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -1631,10 +1631,10 @@ void DBImpl::BackgroundCallFlush() { } } - // delete unnecessary files if any, this is done outside the mutex // If !s.ok(), this means that Flush failed. In that case, we want // to delete all obsolete files and we force FindObsoleteFiles() FindObsoleteFiles(deletion_state, !s.ok()); + // delete unnecessary files if any, this is done outside the mutex if (deletion_state.HaveSomethingToDelete()) { mutex_.Unlock(); PurgeObsoleteFiles(deletion_state); @@ -1680,12 +1680,12 @@ void DBImpl::BackgroundCallCompaction() { } } - // delete unnecessary files if any, this is done outside the mutex // If !s.ok(), this means that Compaction failed. In that case, we want // to delete all obsolete files we might have created and we force // FindObsoleteFiles(). This is because deletion_state does not catch // all created files if compaction failed. FindObsoleteFiles(deletion_state, !s.ok()); + // delete unnecessary files if any, this is done outside the mutex if (deletion_state.HaveSomethingToDelete()) { mutex_.Unlock(); PurgeObsoleteFiles(deletion_state); -- GitLab