Skip to content

[ntuple] Encapsulate RNTupleAnchorS3 fields - #22952

Open
JasMehta08 wants to merge 1 commit into
root-project:masterfrom
JasMehta08:s3-anchor-encapsulation
Open

[ntuple] Encapsulate RNTupleAnchorS3 fields#22952
JasMehta08 wants to merge 1 commit into
root-project:masterfrom
JasMehta08:s3-anchor-encapsulation

Conversation

@JasMehta08

Copy link
Copy Markdown
Contributor

This Pull request:

(Is a part of the GSoC 2026 project S3 Backend for RNTuple.)

Changes or fixes:

  • Change RNTupleAnchorS3 from a struct with public fields to a class with private fields and public getters.
  • Declare RPageSinkS3 as a friend so the write path can set fields directly.
  • Update tests to construct anchors via CreateFromJSON using test-local helpers (MakeAnchorJson, MakeAnchor) and read fields through getters.
  • Link nlohmann_json and xxHash to the S3 test target for anchor construction and checksum computation in tests.

Checklist:

  • tested changes locally

This PR is a follow up of #22819

Comment thread tree/ntuple/inc/ROOT/RPageStorageS3.hxx Outdated

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.

Move this method on top of the public methods since it's a static factory method.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have updated the PR with this change.

Comment thread tree/ntuple/test/ntuple_storage_s3.cxx Outdated
auto jsonAnchor3 = jsonAnchor;
jsonAnchor3["cloneTemplate"] = "${baseurl}/other/${name}";
auto d = MakeAnchor(jsonAnchor3);
EXPECT_FALSE(a == d);

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.

EXPECT_NE(a, d)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

for EXPECR_NE(a,d) it needs a != operator (I tried to compile locally and got error saying this), thats why I used EXPECT_FALSE(a == d).
we have not defined a != operator for the anchor.

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.

Let's just define operator!= as well, it's annoying to have one without the other.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have added the != operator and updated the code to use EXPECT_NE

Comment thread tree/ntuple/test/ntuple_storage_s3.cxx Outdated
auto jsonAnchor2 = jsonAnchor;
jsonAnchor2["headerObjId"] = 99;
auto c = MakeAnchor(jsonAnchor2);
EXPECT_FALSE(a == c);

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.

EXPECT_NE(a, c)

@JasMehta08
JasMehta08 force-pushed the s3-anchor-encapsulation branch from 5b8cd1f to 5a847f7 Compare July 29, 2026 09:05
@JasMehta08
JasMehta08 force-pushed the s3-anchor-encapsulation branch from 5a847f7 to 7bc062b Compare July 29, 2026 13:23

@silverweed silverweed 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!

@github-actions

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 22h 22m 3s ⏱️
 3 882 tests  3 882 ✅ 0 💤 0 ❌
79 059 runs  79 059 ✅ 0 💤 0 ❌

Results for commit 7bc062b.

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

Successfully merging this pull request may close these issues.

2 participants