Commit 3cd6ef2b authored by Elvin Sindrilaru's avatar Elvin Sindrilaru

MGM: Accept also file systems under draining as suitable sources and print

the fxid in more log messages for easier debugging.

This improves the draining performance in case both(all) replicas of a file
are being drained.
parent fd0d8762
Pipeline #705353 failed with stages
in 15 minutes and 31 seconds
......@@ -122,8 +122,8 @@ DrainFs::DoIt()
mPending = mTotalFiles;
}
eos_debug("msg=\"drain attempt %i\\%i\" fsid=%llu", ntried,
mMaxRetries.load(), mFsId);
eos_info("msg=\"drain attempt %i\\%i\" fsid=%llu", ntried,
mMaxRetries.load(), mFsId);
for (auto it_fids = mNsFsView->getStreamingFileList(mFsId);
it_fids && it_fids->valid(); /* no progress */) {
......
......@@ -142,7 +142,8 @@ DrainTransferJob::DoIt()
" tpc_err=" << tpc_st.ToStr()).c_str());
} else {
gOFS->MgmStats.Add("DrainCentralSuccessful", 0, 0, 1);
eos_info("msg=\"drain successful\" logid=%s", log_id.c_str());
eos_info("msg=\"drain successful\" logid=%s fxid=%s",
log_id.c_str(), eos::common::FileId::Fid2Hex(mFileId));
mStatus = Status::OK;
return;
}
......@@ -250,7 +251,7 @@ DrainTransferJob::BuildTpcSrc(const FileDrainInfo& fdrain,
if (it != FsView::gFsView.mIdView.end()) {
it->second->SnapShotFileSystem(src_snapshot);
if (src_snapshot.mConfigStatus >= eos::common::FileSystem::kRO) {
if (src_snapshot.mConfigStatus >= eos::common::FileSystem::kDrain) {
found = true;
break;
}
......@@ -274,14 +275,14 @@ DrainTransferJob::BuildTpcSrc(const FileDrainInfo& fdrain,
}
if (!found) {
ReportError(SSTR("msg=\"fid=" << fdrain.mProto.id() <<
" no more replicas available\""));
ReportError(SSTR("msg=\"fxid=" << eos::common::Fid2Hex(fdrain.mProto.id())
<< " no more replicas available\""));
return url_src;
}
} else {
// For RAIN layouts we trigger a reconstruction only once
if (mRainReconstruct) {
ReportError(SSTR("msg=\"fid=" << fdrain.mProto.id()
ReportError(SSTR("msg=\"fxid=" << eos::common::Fid2Hex(fdrain.mProto.id())
<< " rain reconstruct already failed\""));
return url_src;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment