Skip to content

[io] use UUIDv4 in ROOT files#22035

Open
jblomer wants to merge 4 commits intoroot-project:masterfrom
jblomer:fix-uuid
Open

[io] use UUIDv4 in ROOT files#22035
jblomer wants to merge 4 commits intoroot-project:masterfrom
jblomer:fix-uuid

Conversation

@jblomer
Copy link
Copy Markdown
Contributor

@jblomer jblomer commented Apr 23, 2026

Use UUIDv4 in TDirectory (hence in TDirectoryFile and TFile) and in the RMiniFile. Note that TDirectory is used without gSystem (needed for GetCryptoRandom()) in the context of rootcling. In principle, GetCryptoRandom() should work without a TSystem object. That may be for a later PR.

The UUIDv4, unlike the current UUIDv1, is (with high enough probability) globally unique.

Also fixes a race in TUUID::AsString().

Fixes #22015
Replaces #22016

jblomer added 4 commits April 24, 2026 00:14
Use UUIDv4 in TDirectory (hence in TDirectoryFile and TFile) and in the
RMiniFile. Note that TDirectory is used without gSystem (needed for
GetCryptoRandom()) in the context of rootcling.  In principle,
GetCryptoRandom() should work without a TSystem object.  That may be for
a later commit.

The UUIDv4, unlike the current UUIDv1, is (with high enough probability)
globally unique.
@jblomer jblomer requested review from dpiparo, hahnjo, pcanal and silverweed and removed request for ferdymercury and hahnjo April 23, 2026 22:14
Comment on lines +55 to +56
// In the context of rootcling, we don't have gSystem
if (gSystem)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// In the context of rootcling, we don't have gSystem
if (gSystem)
// Fallback to the default constructed TUUID if we
// get here before gSystem is initialized.
if (gSystem)

@github-actions
Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 11h 29m 1s ⏱️
 3 851 tests  3 799 ✅  1 💤 51 ❌
76 931 runs  76 862 ✅ 18 💤 51 ❌

For more details on these failures, see this check.

Results for commit f17534b.

@dpiparo
Copy link
Copy Markdown
Member

dpiparo commented Apr 24, 2026

Impressive PR: thanks for it. It should be backported until 6.36.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non uniquess of the UUID inside TFile

3 participants