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
main
Igor Canadi 11 years ago
parent 4abd219cfc
commit dad425562f
  1. 4
      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);

Loading…
Cancel
Save