Skip to content

Commit

Permalink
make changes to ResumeImpl() that remove calls related to EnableFileD…
Browse files Browse the repository at this point in the history
…eletions(). Following facebook/rocksdb HEAD.
  • Loading branch information
matthewvon committed Jul 22, 2024
1 parent 787887b commit 7210d83
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions db/db_impl/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@ Status DBImpl::ResumeImpl(DBRecoverContext context) {
}

// Make sure the IO Status stored in version set is set to OK.
bool file_deletion_disabled = !IsFileDeletionsEnabled();
if (s.ok()) {
IOStatus io_s = versions_->io_status();
if (io_s.IsIOError()) {
Expand Down Expand Up @@ -413,21 +412,12 @@ Status DBImpl::ResumeImpl(DBRecoverContext context) {
job_context.Clean();

if (s.ok()) {
assert(versions_->io_status().ok());
// If we reach here, we should re-enable file deletions if it was disabled
// during previous error handling.
if (file_deletion_disabled) {
// Always return ok
s = EnableFileDeletions(/*force=*/true);
if (!s.ok()) {
ROCKS_LOG_INFO(
immutable_db_options_.info_log,
"DB resume requested but could not enable file deletions [%s]",
s.ToString().c_str());
}
}
ROCKS_LOG_INFO(immutable_db_options_.info_log, "Successfully resumed DB");
} else {
ROCKS_LOG_INFO(immutable_db_options_.info_log, "Failed to resume DB [%s]",
s.ToString().c_str());
}

mutex_.Lock();
// Check for shutdown again before scheduling further compactions,
// since we released and re-acquired the lock above
Expand Down

0 comments on commit 7210d83

Please sign in to comment.