Print

Print


Ok, this last one was understood and below is the explanation:

In the tape server code when you open a file for writing you are actually using only the OpenFlag::Delete see: https://git.cern.ch/web/CASTOR.git/blob/HEAD:/castor/tape/tapeserver/file/DiskFile.cpp#l598

The in the XRootD client code when a retry is performed (because the server is overloaded and it requests the client to wait and retry) this flag is explicitly removed. You can see it here and also the motivation for this:
https://github.com/xrootd/xrootd/blob/master/src/XrdCl/XrdClFileStateHandler.cc#L1430

Therefore, my suggestion is to use in the tapeserver code the following flags when doing an open for write:
OpenFlags::Delete | OpenFlags::Write or OpenFlags::Delete | OpenFlags::Update if you also read from it through the same file object.

This should provide the protection necessary to avoid this error with the bad file descriptor.


Reply to this email directly or view it on GitHub.



Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1