Skip to content

[ntuple] Fix attribute writing with RMiniFile - #23075

Merged
silverweed merged 3 commits into
root-project:masterfrom
silverweed:ntuple_attr_recreate_fix
Sep 4, 2026
Merged

[ntuple] Fix attribute writing with RMiniFile #23075
silverweed merged 3 commits into
root-project:masterfrom
silverweed:ntuple_attr_recreate_fix

Conversation

@silverweed

Copy link
Copy Markdown
Contributor

WriteTFileNTupleKey was making 2 mistakes:

  • incorrectly writing the TFile's epilogue even for Hidden clones
    (which led to files containing 1 extra StreamerInfo/FreeList/KeysList
    per attribute set);
  • writing the wrong anchor location for attribute RNTuples.

This was not caught by tests because we never actually added tests for
attribute writing through RMiniFile.

@silverweed
silverweed requested review from enirolf and hahnjo August 13, 2026 14:44
@silverweed silverweed self-assigned this Aug 13, 2026
@silverweed
silverweed requested a review from jblomer as a code owner August 13, 2026 14:44
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 15h 26m 13s ⏱️
 3 864 tests  3 864 ✅ 0 💤 0 ❌
78 706 runs  78 706 ✅ 0 💤 0 ❌

Results for commit 36e6a23.

♻️ This comment has been updated with latest results.

@jblomer jblomer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! Perhaps check or add a comment to prevent the use of the minifile with only hidden ntuples (I think we need a main one to produce a correct file).

Comment thread tree/ntuple/test/ntuple_attributes.cxx Outdated
@silverweed

silverweed commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

Perhaps check or add a comment to prevent the use of the minifile with only hidden ntuples (I think we need a main one to produce a correct file).

This should be already mandated by the current public API (you cannot Recreate a RMiniFileWriter which is hidden through public methods: only Append to one or Clone one); though it doesn't hurt to point that out (where is it best to do it? In the private ctor perhaps?)

@silverweed
silverweed force-pushed the ntuple_attr_recreate_fix branch from 8aafc73 to a055390 Compare August 14, 2026 14:11
@jblomer

jblomer commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Perhaps check or add a comment to prevent the use of the minifile with only hidden ntuples (I think we need a main one to produce a correct file).

This should be already mandated by the current public API (you cannot Recreate a RMiniFileWriter which is hidden through public methods: only Append to one or Clone one); though it doesn't hurt to point that out (where is it best to do it? In the private ctor perhaps?)

Private constructor sounds good.

WriteTFileNTupleKey was doing 2 mistakes:
- incorrectly writing the TFile's epilogue even for Hidden clones
  (which led to files containing 1 extra StreamerInfo/FreeList/KeysList
  per attribute set);
- writing the wrong anchor location for attribute RNTuples.

This was not caught by tests because we never actually added tests for
attribute writing through RMiniFile.
@silverweed
silverweed force-pushed the ntuple_attr_recreate_fix branch from a055390 to 280ad88 Compare September 3, 2026 07:52
@silverweed
silverweed merged commit e2a9cc0 into root-project:master Sep 4, 2026
57 of 60 checks passed
@silverweed
silverweed deleted the ntuple_attr_recreate_fix branch September 4, 2026 11:56
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.

2 participants