Skip to content

Commit

Permalink
PSMDB-810 log more info during hot backup on debug level 2
Browse files Browse the repository at this point in the history
  • Loading branch information
igorsol committed Feb 14, 2021
1 parent bec98c3 commit d958235
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2069,6 +2069,16 @@ Status WiredTigerKVEngine::hotBackup(OperationContext* opCtx, const std::string&
fs::path destFile{std::get<1>(file)};
auto fsize{std::get<2>(file)};

if (MONGO_unlikely(shouldLog(logger::LogSeverity::Debug(2)))) {
LOG(2) << "Hot backup copying {} bytes from '{}' to '{}'"_format(
fsize, srcFile.string(), destFile.string());
if (!fs::exists(srcFile)) {
LOG(2) << "Source file does not exist: {}"_format(srcFile.string());
} else {
LOG(2) << "Source file size is: {} bytes"_format(fs::file_size(srcFile));
}
}

try {
// Try creating destination directories if needed.
const fs::path destDir(destFile.parent_path());
Expand Down

0 comments on commit d958235

Please sign in to comment.