Skip to content

Form read write split#442

Merged
wwuoneway merged 29 commits intoFramework-R-D:mainfrom
aolivier23:form_read_write_split
Mar 27, 2026
Merged

Form read write split#442
wwuoneway merged 29 commits intoFramework-R-D:mainfrom
aolivier23:form_read_write_split

Conversation

@aolivier23
Copy link
Copy Markdown
Contributor

This PR splits form_interface into two components: form_reader_interface and form_writer_interface. This split saves FORM time by avoiding lock contention between read and write processes and prepares for RNTuple support that does not have members for an RNTupleWriter when only reading from a container.

All of the layers that power the former form_interface are split in this way. A handful of functions shared between reading and writing have been made free functions in form::experimental::detail.

@aolivier23
Copy link
Copy Markdown
Contributor Author

@phlexbot format

@github-actions
Copy link
Copy Markdown
Contributor

Format Fixes Applied

✅ clang-format fixes pushed (commit d586ade)
✅ cmake-format fixes pushed (commit 0e84f5f)
✅ ruff fixes pushed (commit ee7bae1)
✅ YAML formatter fixes pushed (commit 23e120b)

⚠️ Note: Some issues may require manual review.

@greenc-FNAL
Copy link
Copy Markdown
Contributor

Review the full CodeQL report for details.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 23, 2026

Codecov Report

❌ Patch coverage is 83.21995% with 74 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
form/root_storage/root_tbranch_read_container.cpp 76.78% 8 Missing and 5 partials ⚠️
form/root_storage/root_tbranch_write_container.cpp 75.47% 9 Missing and 4 partials ⚠️
form/root_storage/root_ttree_write_container.cpp 50.00% 6 Missing and 6 partials ⚠️
form/storage/storage_reader.cpp 82.60% 4 Missing and 4 partials ⚠️
form/storage/storage_writer.cpp 84.78% 4 Missing and 3 partials ⚠️
form/form/form_writer.cpp 77.77% 3 Missing and 3 partials ⚠️
form/util/factories.hpp 77.77% 0 Missing and 4 partials ⚠️
form/persistence/persistence_reader.cpp 84.21% 2 Missing and 1 partial ⚠️
form/root_storage/root_ttree_read_container.cpp 70.00% 2 Missing and 1 partial ⚠️
form/form/form_reader.cpp 83.33% 1 Missing and 1 partial ⚠️
... and 2 more
@@            Coverage Diff             @@
##             main     #442      +/-   ##
==========================================
+ Coverage   85.00%   85.30%   +0.29%     
==========================================
  Files         127      145      +18     
  Lines        3341     3429      +88     
  Branches      574      584      +10     
==========================================
+ Hits         2840     2925      +85     
+ Misses        306      304       -2     
- Partials      195      200       +5     
Flag Coverage Δ
unittests 85.30% <83.21%> (+0.29%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
form/form/config.cpp 100.00% <ø> (ø)
form/form/config.hpp 100.00% <100.00%> (ø)
form/form/form_reader.hpp 100.00% <100.00%> (ø)
form/form/form_writer.hpp 100.00% <100.00%> (ø)
form/form_module.cpp 89.36% <100.00%> (+0.23%) ⬆️
form/persistence/ipersistence_reader.hpp 100.00% <100.00%> (ø)
form/persistence/ipersistence_writer.hpp 100.00% <100.00%> (ø)
form/persistence/persistence_reader.hpp 100.00% <100.00%> (ø)
form/persistence/persistence_writer.cpp 100.00% <100.00%> (ø)
form/persistence/persistence_writer.hpp 100.00% <100.00%> (ø)
... and 28 more

... and 7 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3bda620...39bb52e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread form/form/form_reader.cpp Outdated
Comment thread form/form/form_reader.cpp Outdated
Comment thread form/form/form_writer.cpp Outdated
Comment thread form/form/product_with_name.hpp
Comment thread form/persistence/ipersistence_reader.hpp Outdated
Comment thread form/root_storage/root_tbranch_read_container.cpp Outdated
Comment thread form/root_storage/root_tbranch_read_container.cpp
Comment thread form/root_storage/root_tbranch_read_container.cpp Outdated
Comment thread form/root_storage/root_ttree_read_container.cpp Outdated
Comment thread form/storage/storage_associative_read_container.cpp Outdated
@aolivier23
Copy link
Copy Markdown
Contributor Author

@phlexbot format

@github-actions
Copy link
Copy Markdown
Contributor

Format Fixes Applied

✅ clang-format fixes pushed (commit c47a8c6)

⚠️ Note: Some issues may require manual review.

Storage[Reader|Writer] member variables.
wwuoneway
wwuoneway previously approved these changes Mar 24, 2026
Copy link
Copy Markdown
Contributor

@wwuoneway wwuoneway left a comment

Choose a reason for hiding this comment

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

Thanks @aolivier23 and @gemmeren for the constructive comments and productive conversation. I agree with the proposed path: let's proceed by renaming output_item_config (to something more neutral like Itemconfig or item_config) to resolve the immediate naming conflict/confusion, and then complete/merge this PR. We can address the remaining know issues regarding configuration/getToken() and the technology versioning in a follow-up PR to keep this structural split manageable.

Comment thread form/form/form_reader.cpp
friendly to reader components.  We eventually plan to remove the need
for ItemConfig from readers entirely, but that will be a future PR.
@aolivier23
Copy link
Copy Markdown
Contributor Author

Realized I didn't rename the function configureOutputItems. Will fix in just a few minutes.

@aolivier23
Copy link
Copy Markdown
Contributor Author

@phlexbot format

@github-actions
Copy link
Copy Markdown
Contributor

Format Fixes Applied

✅ clang-format fixes pushed (commit 39bb52e)

⚠️ Note: Some issues may require manual review.

@aolivier23
Copy link
Copy Markdown
Contributor Author

@phlexbot format

@github-actions
Copy link
Copy Markdown
Contributor

Format Fixes Applied

✅ clang-format fixes pushed (commit 888c71e)

⚠️ Note: Some issues may require manual review.

Copy link
Copy Markdown
Contributor

@wwuoneway wwuoneway left a comment

Choose a reason for hiding this comment

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

thanks for the updates. The changes look fine, and given the scope and complexity already included in this PR, I'm comfortable moving forward. Regarding the CI failures, the clang-tidy is confirmed as unrelated to these specific changes. For code coverage, the cause is unclear, but I agree it shouldn't block this merge.

@aolivier23 aolivier23 marked this pull request as ready for review March 27, 2026 15:08
Copy link
Copy Markdown
Contributor

@gemmeren gemmeren left a comment

Choose a reason for hiding this comment

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

LGTM, the only comment is that if we consider the use of output_config by reader to be temporary, then we don't really need to rename it. Up to you.

@wwuoneway wwuoneway merged commit 863ec30 into Framework-R-D:main Mar 27, 2026
39 of 42 checks passed
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.

4 participants