risingwavelabs/risingwave · error · StreamExecutorError
left barrier received while right stream end
Error message
left barrier received while right stream end
What it means
Mirror case of the right-side error: after the left input ended, the right stream delivered a Barrier. The barrier aligner cannot forward a barrier to a downstream that expects both sides aligned, so it errors out.
Source
Thrown at src/stream/src/executor/barrier_align.rs:102
}
Message::Chunk(chunk) => yield AlignedMessage::Right(chunk),
Message::Barrier(_) => {
bail!("right barrier received while left stream end");
}
}
}
break;
}
Either::Right((None, _)) => {
// right stream end, passthrough left chunks
while let Some(msg) = left.next().await {
match msg? {
Message::Watermark(watermark) => {
yield AlignedMessage::WatermarkLeft(watermark)
}
Message::Chunk(chunk) => yield AlignedMessage::Left(chunk),
Message::Barrier(_) => {
bail!("left barrier received while right stream end");
}
}
}
break;
}
Either::Left((Some(msg), _)) => match msg? {
Message::Watermark(watermark) => yield AlignedMessage::WatermarkLeft(watermark),
Message::Chunk(chunk) => yield AlignedMessage::Left(chunk),
Message::Barrier(barrier) => loop {
let start_time = Instant::now();
// received left barrier, waiting for right barrier
match right
.next()
.instrument_await(await_tree::span!(
"barrier_align_wait_right epoch={}",
barrier.epoch.curr
))
.awaitView on GitHub (pinned to 6469eb736d)
Solutions
- Make both barrier-producing upstreams terminate in lockstep (same barriers, same shutdown).
- Investigate why the left upstream ended early — usually an upstream failure visible in earlier logs.
- In tests, ensure both input streams contain barriers at the same positions.
Defensive patterns
Strategy: validation
Validate before calling
// ensure both test inputs end together assert!(right_msgs.iter().rposition(|m| m.is_barrier()).unwrap_or(0) <= left_msgs.len());
Try / catch
match barrier_align(left, right).next().await { Some(Err(e)) if e.to_string().contains("left barrier received while right stream end") => { align_inputs(); } other => ... } Prevention
- Terminate both barrier streams in lockstep
- Propagate single-side upstream failure to the other side
- Construct test inputs with barrier sequences aligned 1:1
When it happens
Trigger: The right input keeps producing barriers after the left input stream returned None, in `barrier_align` (exercised via `barrier_align_for_test`).
Common situations: Asymmetric upstream failure/shutdown on one side of a binary operator; test streams with mismatched message sequences; one upstream actor terminated early.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- right barrier received while left stream end
- Exchange executor should not have children!
- Iceberg source should not have input executor!
- core predicate must exist
- batch refresh job {} has no snapshot backfill info
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/195d7bd0b28686e6.
Report an issue: GitHub.