Skip to content

Commit 3dd2a6e

Browse files
committed
PSMDB-810 log more info during hot backup
1 parent bec98c3 commit 3dd2a6e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2064,11 +2064,20 @@ Status WiredTigerKVEngine::hotBackup(OperationContext* opCtx, const std::string&
20642064
std::set<fs::path> existDirs{destPath};
20652065

20662066
// Do copy files
2067+
int fcCtr = 0;
20672068
for (auto&& file : filesList) {
20682069
fs::path srcFile{std::get<0>(file)};
20692070
fs::path destFile{std::get<1>(file)};
20702071
auto fsize{std::get<2>(file)};
20712072

2073+
log() << "Beginning copy of {}/{} files in backup snapshot: {}, {} bytes"_format(
2074+
++fcCtr, filesList.size(), srcFile.string(), fsize);
2075+
if (!fs::exists(srcFile)) {
2076+
log() << "Source file does not exist: {}"_format(srcFile.string());
2077+
} else {
2078+
log() << "Source file size is: {} bytes"_format(fs::file_size(srcFile));
2079+
}
2080+
20722081
try {
20732082
// Try creating destination directories if needed.
20742083
const fs::path destDir(destFile.parent_path());

0 commit comments

Comments
 (0)