Commit 5d0aa817 authored by Nikola Hardi's avatar Nikola Hardi
Browse files

CEPH - Fallback to internal write counters if GetSize() is negative

parent 39e85194
Pipeline #2298628 passed with stage
in 12 minutes and 30 seconds
......@@ -516,6 +516,20 @@ void TJAlienFile::Close(Option_t * option)
// Close file
TAliceFile::Close(option);
// On some SEs such as CEPH, stat size is not up to date before close
// With TXNet, GetSize() after close returns fBytesWrite
// With TNetXNG, GetSize() doesn't work after close
// Proceed with file commit if internal counters are positive
if(siz <= 0 && fBytesWrite > 0) {
if(gDebug > 0) {
::Info("TJAlienFile::Close",
"XrdStat reported size %d, but client write counters show %d bytes", siz, fBytesWrite);
}
siz = fBytesWrite;
}
if (siz <= 0) {
Error("Close", "the reported size of the written file is <= 0");
return;
......
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