Skip to content

Commit

Permalink
Improve logging message for retryable background IO errors (#2317)
Browse files Browse the repository at this point in the history
Co-authored-by: Twice <twice@apache.org>
Co-authored-by: Myth <caipengbo@outlook.com>
  • Loading branch information
3 people authored May 17, 2024
1 parent a6f0de2 commit 15d81f0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/server/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -808,8 +808,12 @@ void Server::cron() {
// In order to properly handle all possible situations on rocksdb, we manually resume here
// when encountering no space error and disk quota exceeded error.
if (counter != 0 && counter % 600 == 0 && storage->IsDBInRetryableIOError()) {
storage->GetDB()->Resume();
LOG(INFO) << "[server] Schedule to resume DB after retryable IO error";
auto s = storage->GetDB()->Resume();
if (s.ok()) {
LOG(WARNING) << "[server] Successfully resumed DB after retryable IO error";
} else {
LOG(ERROR) << "[server] Failed to resume DB after retryable IO error: " << s.ToString();
}
storage->SetDBInRetryableIOError(false);
}

Expand Down

0 comments on commit 15d81f0

Please sign in to comment.