Summary
FORM's write path currently has no internal locking. It relies on Phlex registering the output node with concurrency::serial to serialize writes.
FORM must be thread-safe independently of Phlex scheduling. The write path does not need to be concurrent by default.
Required work
Add FORM-owned synchronization for the write path.
Possible solutions include write-path mutexes that follow the existing read-side mutex pattern:
root_tbranch_read_mutex
root_rfield_read_mutex
Audit other write-path call sites that require synchronization.
Scope
This issue is independent of #834, which tracks row-index handling for a future ROOT::RNTupleParallelWriter implementation.
Affected areas
form/root_storage/
- ROOT write containers
- Storage and persistence writer call paths
- Write lifecycle operations such as setup, fill, and commit
Acceptance criteria
- FORM write operations are safe when callers invoke them from multiple threads.
- The implementation does not depend on Phlex
concurrency::serial for correctness.
- The default implementation does not introduce concurrent writes unless explicitly designed to do so.
- The audit identifies and protects relevant write-path shared state.
- Tests cover the selected synchronization behavior.
References
Requested by: @wwuoneway
Summary
FORM's write path currently has no internal locking. It relies on Phlex registering the output node with
concurrency::serialto serialize writes.FORM must be thread-safe independently of Phlex scheduling. The write path does not need to be concurrent by default.
Required work
Add FORM-owned synchronization for the write path.
Possible solutions include write-path mutexes that follow the existing read-side mutex pattern:
root_tbranch_read_mutexroot_rfield_read_mutexAudit other write-path call sites that require synchronization.
Scope
This issue is independent of #834, which tracks row-index handling for a future
ROOT::RNTupleParallelWriterimplementation.Affected areas
form/root_storage/Acceptance criteria
concurrency::serialfor correctness.References
Requested by: @wwuoneway