{"record":{"id":"c4b2995f5ba38408","repo":"risingwavelabs/risingwave","slug":"batchposixfsreader-should-not-hit-this-branch-ref","errorCode":null,"errorMessage":"BatchPosixFsReader should not hit this branch. refer to `batch_posix_fs_list.rs`, `batch_posix_fs_fetch.rs`","messagePattern":"BatchPosixFsReader should not hit this branch\\. refer to `batch_posix_fs_list\\.rs`, `batch_posix_fs_fetch\\.rs`","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"src/connector/src/source/filesystem/opendal_source/batch_posix_fs_source.rs","lineNumber":150,"sourceCode":"pub struct BatchPosixFsReader {}\n\n#[async_trait]\nimpl SplitReader for BatchPosixFsReader {\n    type Properties = BatchPosixFsProperties;\n    type Split = BatchPosixFsSplit;\n\n    async fn new(\n        _properties: Self::Properties,\n        _splits: Vec<Self::Split>,\n        _parser_config: ParserConfig,\n        _source_ctx: SourceContextRef,\n        _columns: Option<Vec<Column>>,\n    ) -> ConnectorResult<Self> {\n        return Err(anyhow!(\"BatchPosixFsReader should not be used\").into());\n    }\n\n    fn into_stream(self) -> BoxSourceChunkStream {\n        unreachable!(\n            \"BatchPosixFsReader should not hit this branch. refer to `batch_posix_fs_list.rs`, `batch_posix_fs_fetch.rs`\"\n        );\n    }\n}\n","sourceCodeStart":132,"sourceCodeEnd":155,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/filesystem/opendal_source/batch_posix_fs_source.rs#L132-L155","documentation":"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.","triggerScenarios":"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.","commonSituations":"Engine routing bug where a batch filesystem source is scheduled as a streaming source; tests or tools driving the reader's stream interface generically.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// into_stream panics (unreachable!) - cannot be caught; avoid by construction:\n// ensure the executor uses batch_posix_fs_list/fetch for BatchPosixFsSource\ndebug_assert!(!matches!(source, Source::BatchPosixFs(_)), \"use batch list/fetch path\");","preventionTips":["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."],"tags":["panic","unreachable","filesystem-source","internal-invariant","rust"],"backgroundTag":"internal-invariant-violation","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}