{"record":{"id":"a7b4475dbe89ea54","repo":"risingwavelabs/risingwave","slug":"batchposixfsreader-should-not-be-used","errorCode":null,"errorMessage":"BatchPosixFsReader should not be used","messagePattern":"BatchPosixFsReader should not be used","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/connector/src/source/filesystem/opendal_source/batch_posix_fs_source.rs","lineNumber":146,"sourceCode":"}\n\n/// Reader for batch posix fs source\n#[derive(Debug)]\npub 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":128,"sourceCodeEnd":155,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/filesystem/opendal_source/batch_posix_fs_source.rs#L128-L155","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"// never call new(); use the batch path\nlet chunks = batch_posix_fs_list::list_chunks(...).await?;","preventionTips":["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."],"tags":["internal-invariant","filesystem-source","rust","unsupported"],"backgroundTag":"method-not-implemented","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"}