risingwavelabs/risingwave · critical
BatchPosixFsReader should not hit this branch. refer to `bat
Error message
BatchPosixFsReader should not hit this branch. refer to `batch_posix_fs_list.rs`, `batch_posix_fs_fetch.rs`
What it means
into_stream of BatchPosixFsReader panics via unreachable! because streaming chunks are never meant to flow through this reader; the batch filesystem source uses dedicated list (batch_posix_fs_list.rs) and fetch (batch_posix_fs_fetch.rs) paths instead. Reaching it means the generic stream-execution path was incorrectly applied to this source.
Source
Thrown at src/connector/src/source/filesystem/opendal_source/batch_posix_fs_source.rs:150
pub struct BatchPosixFsReader {}
#[async_trait]
impl SplitReader for BatchPosixFsReader {
type Properties = BatchPosixFsProperties;
type Split = BatchPosixFsSplit;
async fn new(
_properties: Self::Properties,
_splits: Vec<Self::Split>,
_parser_config: ParserConfig,
_source_ctx: SourceContextRef,
_columns: Option<Vec<Column>>,
) -> ConnectorResult<Self> {
return Err(anyhow!("BatchPosixFsReader should not be used").into());
}
fn into_stream(self) -> BoxSourceChunkStream {
unreachable!(
"BatchPosixFsReader should not hit this branch. refer to `batch_posix_fs_list.rs`, `batch_posix_fs_fetch.rs`"
);
}
}
View on GitHub (pinned to 6469eb736d)
Solutions
- Ensure the batch POSIX FS source is executed via batch_posix_fs_list.rs / batch_posix_fs_fetch.rs paths, not the generic into_stream pipeline.
- Audit how the source type is dispatched when this panic occurs and fix the routing so BatchPosixFsReader is never turned into a stream.
- If triggered by user DDL, check which connector/engine combination scheduled the source and report it as a bug.
Defensive patterns
Strategy: try-catch
Try / catch
// into_stream panics (unreachable!) - cannot be caught; avoid by construction: // ensure the executor uses batch_posix_fs_list/fetch for BatchPosixFsSource debug_assert!(!matches!(source, Source::BatchPosixFs(_)), "use batch list/fetch path");
Prevention
- Never feed BatchPosixFsSource into the generic streaming executor.
- Keep dispatch tables explicit per source kind so batch sources never hit into_stream.
- Add compile-time separation (distinct trait impls) if extending these sources.
When it happens
Trigger: Calling into_stream() on a BatchPosixFsReader instance - i.e., the framework attempts to consume it as a streaming chunk source instead of the batch list/fetch path.
Common situations: Engine routing bug where a batch filesystem source is scheduled as a streaming source; tests or tools driving the reader's stream interface generically.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- BatchPosixFsReader should not be used
- All valid CDC connectors should have returned by now
- internal error: entered unreachable code
- Unprocessed shared node.
- internal error: entered unreachable code
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/c4b2995f5ba38408.
Report an issue: GitHub.