Check duplicate issues.
Description
A few weeks ago LHCb switched from using a custom UUIDv4 to identify ROOT file to the TUUID that comes from ROOT's TFile.
This led to observing collisions of GUID between files that are produced concomitantly on the same worker node on the grid.
Reproducer
- Write
mkuuid.cxx
#include "TUUID.h"
#include <cstdio>
int main() {
TUUID u;
puts(u.AsString());
return 0;
}
g++ -O2 -o mkuuid mkuuid.cxx $(root-config --cflags --libs)
seq 50000 | xargs -P 512 -n1 ./mkuuid > uuids.txt
- check for duplicates (might take some tuning depending on the machine
$ wc -l uuids.txt
50000 uuids.txt
$ sort uuids.txt | uniq -d
d90ba95e-3e4b-11f1-a11e-ebd58d80beef
ROOT version
all
Installation method
LCG and Conda
Operating system
Linux
Additional context
For reference, this was the previous LHCb implementation
https://gitlab.cern.ch/gaudi/Gaudi/-/blob/34daa81ac63690ebf0aff19e8cd4454f7bb4ef34/GaudiUtils/src/component/createGuidAsString.cpp
https://linux.die.net/man/3/uuid_generate_time
Check duplicate issues.
Description
A few weeks ago LHCb switched from using a custom UUIDv4 to identify ROOT file to the TUUID that comes from ROOT's TFile.
This led to observing collisions of GUID between files that are produced concomitantly on the same worker node on the grid.
Reproducer
mkuuid.cxxg++ -O2 -o mkuuid mkuuid.cxx $(root-config --cflags --libs)seq 50000 | xargs -P 512 -n1 ./mkuuid > uuids.txt$ wc -l uuids.txt 50000 uuids.txt $ sort uuids.txt | uniq -d d90ba95e-3e4b-11f1-a11e-ebd58d80beefROOT version
all
Installation method
LCG and Conda
Operating system
Linux
Additional context
For reference, this was the previous LHCb implementation
https://gitlab.cern.ch/gaudi/Gaudi/-/blob/34daa81ac63690ebf0aff19e8cd4454f7bb4ef34/GaudiUtils/src/component/createGuidAsString.cpp
https://linux.die.net/man/3/uuid_generate_time