Skip to content

Commit 7766a9e

Browse files
committed
FST: if we have a remote IO error for replica write, we pretend the local write is sucessful and we compute the checksum properly - fixes EOS-6415
1 parent 33dd5d4 commit 7766a9e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

fst/XrdFstOfsFile.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,8 +1130,14 @@ XrdFstOfsFile::write(XrdSfsFileOffset fileOffset, const char* buffer,
11301130
rc = buffer_size;
11311131
}
11321132

1133+
// In case we have a remote write error for a replica, the local replica is still ok!
1134+
if ( (rc < 0) && (eos::common::LayoutId::IsReplica(mLid) &&
1135+
(mLayout->GetErrObj()->getErrInfo() == EREMOTEIO)) ) {
1136+
rc = buffer_size;
1137+
}
1138+
11331139
// Evt. add checksum
1134-
if (rc > 0) {
1140+
if ( (rc > 0) ) {
11351141
if (mCheckSum) {
11361142
mCheckSum->Add(buffer, static_cast<size_t>(rc),
11371143
static_cast<off_t>(fileOffset));

0 commit comments

Comments
 (0)