Skip to content

Commit d958235

Browse files
committed
PSMDB-810 log more info during hot backup on debug level 2
1 parent bec98c3 commit d958235

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -2069,6 +2069,16 @@ Status WiredTigerKVEngine::hotBackup(OperationContext* opCtx, const std::string&
20692069
fs::path destFile{std::get<1>(file)};
20702070
auto fsize{std::get<2>(file)};
20712071

2072+
if (MONGO_unlikely(shouldLog(logger::LogSeverity::Debug(2)))) {
2073+
LOG(2) << "Hot backup copying {} bytes from '{}' to '{}'"_format(
2074+
fsize, srcFile.string(), destFile.string());
2075+
if (!fs::exists(srcFile)) {
2076+
LOG(2) << "Source file does not exist: {}"_format(srcFile.string());
2077+
} else {
2078+
LOG(2) << "Source file size is: {} bytes"_format(fs::file_size(srcFile));
2079+
}
2080+
}
2081+
20722082
try {
20732083
// Try creating destination directories if needed.
20742084
const fs::path destDir(destFile.parent_path());

0 commit comments

Comments
 (0)