risingwavelabs/risingwave · error
BatchPosixFsReader should not be used
Error message
BatchPosixFsReader should not be used
What it means
BatchPosixFsReader::new unconditionally returns an error: this reader type is never meant to be instantiated. The batch POSIX FS source executes via the specialized list/fetch paths (batch_posix_fs_list.rs, batch_posix_fs_fetch.rs), so the generic StreamSourceReader construction path is unsupported. Hitting it means code is routing this source through the wrong engine path.
Source
Thrown at src/connector/src/source/filesystem/opendal_source/batch_posix_fs_source.rs:146
}
/// Reader for batch posix fs source
#[derive(Debug)]
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
- Do not construct BatchPosixFsReader; use the batch list/fetch paths referenced in batch_posix_fs_list.rs and batch_posix_fs_fetch.rs.
- Check how the source was registered; ensure it's executed as a batch filesystem source, not a streaming source reader.
- If this appears in production, file/inspect the caller - it indicates an engine-side routing bug, not a user config problem.
Defensive patterns
Strategy: fallback
Try / catch
// never call new(); use the batch path let chunks = batch_posix_fs_list::list_chunks(...).await?;
Prevention
- Route batch filesystem sources only through the documented list/fetch paths.
- Add a test asserting BatchPosixFsReader::new is never invoked by the generic framework.
- Treat this error as a routing bug: audit dispatch logic if it ever fires.
When it happens
Trigger: Any call to BatchPosixFsReader::new - typically from the generic batch source framework instantiating a reader for the source instead of using the batch list/fetch implementation.
Common situations: Internal misuse: wiring BatchPosixFsSource into a code path that expects a normal streaming reader; custom tooling or tests constructing readers generically for all source types.
Related errors
- BatchPosixFsReader should not hit this branch. refer to `bat
- Row sequential scan should not have input executor!
- Source should not have input executor!
- Row sequential scan should not have input executor!
- ValuesExecutor should have no child!
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/a7b4475dbe89ea54.
Report an issue: GitHub.