URL:
<http://savannah.cern.ch/bugs/?100564>
Summary: File name when using multiple data disks not unique
under certain conditions
Project: XROOTD
Submitted by: wilko
Submitted on: 2013-02-21 18:28
Report Type: Bug
Priority: 7 - High
Severity: 4 - Important
Status: Investigating
Privacy: Public
Assigned to: wilko
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Fixed by commit(s):
_______________________________________________________
Details:
A xrootd server that is using multiple file systems that hold the data will
create a file with a unique name on a data disk and a link with the proper
name that points to this file.
The unique name is calculated, amongst others, from the unix-time the process
(xrootd, frm_admin) was started and a sequence number that is increased for
every new file. However, if two processes are started at the same time the
filenames will not be unique.
For example running:
frm_admin reloc /test/file1 public:/data/disk
frm_admin reloc /test/file2 public:/data/disk
will yield the same filename in /data/disk if both commands run within 1sec.
In this case file1 will be overwritten by file2.
A possible fix is to add the pid of the process to the file name which should
yield a unique filename (within a server).
One could also consider to fail if a file already exists.
It needs some investigation to make sure that adding the pid or failing if a
filename is already used won't break anything.
_______________________________________________________
Reply to this item at:
<http://savannah.cern.ch/bugs/?100564>
_______________________________________________
Message sent via/by LCG Savannah
http://savannah.cern.ch/
########################################################################
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
|