Skip to content

DPL: do not let a completed input channel hold back the others - #16270

Open
ktf wants to merge 1 commit into
AliceO2Group:devfrom
ktf:pr16270
Open

ktf wants to merge 1 commit into
AliceO2Group:devfrom
ktf:pr16270

Conversation

@ktf

@ktf ktf commented Dec 3, 2026

Copy link
Copy Markdown
Member

A time-pipelined source whose lane ends early, e.g. an AOD reader lane
with no files left with --readers 2, leaves a completed input channel in
its consumers whose oldest possible timeslice never advances again.

Before, that stale value was still used:

  • as the reference of the channel balancing in doPrepare: the channel of
    the live lane was suspended once it was ahead of it, and, as no polled
    channel was still running, the consumer went to EndOfStream with data
    still in flight;
  • in the minimum of TimesliceIndex::setOldestPossibleInput: the oldest
    possible output stopped advancing, so the dummy sink stopped reporting
    consumed timeslices and the rate limiting stopped offering them.
    Either way the remaining reader lane starved forever on its shared memory
    or timeslice offers, and the workflow hung.

Completed channels are now ignored for both. The timeslices of the ended
lane are then skipped by ordered consumers (e.g. the AOD writer) through
the oldest possible timeslice, which happens asynchronously: at end of
stream, when nothing can arrive anymore, skip to the oldest pending
timeslice directly, or the last pending ones are dropped.

Add a workflow test where one of two pipelined source lanes ends at once:
before, its consumer got 10 of 100 timeframes.

A time-pipelined source whose lane ends early, e.g. an AOD reader lane
with no files left with --readers 2, leaves a completed input channel in
its consumers whose oldest possible timeslice never advances again.

Before, that stale value was still used:
- as the reference of the channel balancing in doPrepare: the channel of
  the live lane was suspended once it was ahead of it, and, as no polled
  channel was still running, the consumer went to EndOfStream with data
  still in flight;
- in the minimum of TimesliceIndex::setOldestPossibleInput: the oldest
  possible output stopped advancing, so the dummy sink stopped reporting
  consumed timeslices and the rate limiting stopped offering them.
Either way the remaining reader lane starved forever on its shared memory
or timeslice offers, and the workflow hung.

Completed channels are now ignored for both. The timeslices of the ended
lane are then skipped by ordered consumers (e.g. the AOD writer) through
the oldest possible timeslice, which happens asynchronously: at end of
stream, when nothing can arrive anymore, skip to the oldest pending
timeslice directly, or the last pending ones are dropped.

Add a workflow test where one of two pipelined source lanes ends at once:
before, its consumer got 10 of 100 timeframes.
@ktf
ktf requested a review from a team as a code owner December 3, 2026 09:39

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant