Skip to content

Conversation

@jblomer
Copy link
Contributor

@jblomer jblomer commented Oct 31, 2025

Enables a shared RNTupleReader to read multiple streams efficiently. On the page source layer, add the possibility to pin and unpin clusters. Data from pinned clusters will not be evicted from the cluster pool or the page pool.

Extend the RNTupleReader API by "active entry tokens". Active entry tokens keep an entry alive in the cache. Internally, the active entries turn into a reference counter for the corresponding cluster, so that the clusters are pinned and unpinned correctly.

Active entry tokens should provide a flexible API not only to support multiple streams but also to keep, e.g., certain (past) reference events alive.

While this functionality is different from the description in #16325, it may be the flexibility that is actually needed.

@Dr15Jones FYI

This is only used in unit tests. It should wait for all clusters that
are scheduled for background loading. However, it should _not_ remove
those clusters from the in-flight queue but just let the queue with the
ready clusters sit there for pickup by GetCluster().
Pinned clusters and their successors won't be evicted from the cluster
pool. This also means that the cluster pool cannot have a fixed size
anymore.
Now that the pool is not fixed-size anymore, use a hash map instead of a
vector.
API extension to tell RNTuple about the lifetime of entries. Useful when
multiple streams (threads) share a single reader.

The active entry tokens are linked to the reader by a shared control
block. Active entry tokens can be copied and moved and take care of the
reference counting of active entry numbers to clusters, such that the
corresponding clusters are pinned and unpinned as needed.
@jblomer jblomer self-assigned this Oct 31, 2025
@jblomer jblomer requested a review from couet as a code owner October 31, 2025 10:54
@jblomer jblomer marked this pull request as draft October 31, 2025 10:55
@github-actions
Copy link

Test Results

    22 files      22 suites   3d 18h 9m 13s ⏱️
 3 706 tests  3 699 ✅ 0 💤  7 ❌
79 585 runs  79 569 ✅ 0 💤 16 ❌

For more details on these failures, see this check.

Results for commit c02ff65.

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.

1 participant