Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing a file with xrdcp and POSC enabled deletes the file if it already exists #1270

Closed
klabattermann opened this issue Aug 18, 2020 · 0 comments

Comments

@klabattermann
Copy link
Member

When POSC is enabled and I write a file that already exists the file is getting deleted by the xrootd server.
POSC is enabled either on the server ( ofs.persist manual hold 1m) or as an option to xrdcp (--psoc), both show the same behavior.

For example if the file already exists xrdcp will fail:
% xrdcp --posc f6 xroot://server:2061//test/mfx/test/f6
Run: [ERROR] Server responded with an error: [3006] Unable to create /test/mfx/test/f6; file exists (destination)
After that checking on the server shows that the file is gone.

The XRootD server log shows (removed time stamp):
14990 psdatmgr.3382:25@n1.slac.stanford.edu XrootdProtocol: 0100 req=stat dlen=18
14990 psdatmgr.3382:25@n1.slac.stanford.edu ofs_stat: fn=/test/mfx/test/f6
14990 psdatmgr.3382:25@n1.slac.stanford.edu XrootdProtocol: 0100 rc=0 stat /test/mfx/test/f6
14990 psdatmgr.3382:25@n1.slac.stanford.edu XrootdResponse: 0100 sending 37 data bytes
14990 psdatmgr.3382:25@n1.slac.stanford.edu XrootdProtocol: 0100 req=open dlen=31
14990 psdatmgr.3382:25@n1.slac.stanford.edu XrootdProtocol: 0100 open unmtp /test/mfx/test/f6?oss.asize=37
14990 psdatmgr.3382:25@n1.slac.stanford.edu ofs_open: 100102-40644 fn=/test/mfx/test/f6
14990 ofs_open: psdatmgr.3382:25@n1.slac.stanford.edu Unable to create /test/mfx/test/f6; file exists
14990 oss_Adjust: free=10261378137935872--37 path=/global/cfs/cdirs/lcls/projecta/lcls/test/
14990 oss_Unlink: lcl rc=0 path=/global/cfs/cdirs/lcls/projecta/lcls/test/mfx/test/f6
14990 psdatmgr.3382:25@n1.slac.stanford.edu XrootdResponse: 0100 sending err 3006: Unable to create /test/mfx/test/f6; file exists

The second to last line shows an oss_Unlink which deletes the file (I assume). Without POSC it works fine.
XRootD version v4.12.3 was used (server, xrdcp)

xrdcp with debug option shows that the following open options are used:
with POSC: kXR_new kXR_open_updt kXR_posc kXR_async kXR_retstat
without POSC: kXR_new kXR_open_updt kXR_async kXR_retstat
so the difference is only the kXR_posc option.

Thanks a lot,
Wilko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant