{"record":{"id":"30ddc4d8054d4ecd","repo":"quickwit-oss/quickwit","slug":"missing-file","errorCode":null,"errorMessage":"missing file `{}`","messagePattern":"missing file `(.+?)`","errorType":"error_code","errorClass":"StorageError","httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-storage/src/bundle_storage.rs","lineNumber":513,"sourceCode":"    ) -> crate::StorageResult<()> {\n        let file_len = self.file_num_bytes(path).await? as usize;\n        let block_size = 100_000_000;\n        for block in chunk_range(0..file_len, block_size) {\n            let file_content = self.get_slice(path, block).await?;\n            output.write_all(&file_content).await?;\n        }\n        output.flush().await?;\n        Ok(())\n    }\n\n    async fn get_slice(\n        &self,\n        path: &Path,\n        range: Range<usize>,\n    ) -> crate::StorageResult<OwnedBytes> {\n        let file_range = self.file_ranges.get(path).ok_or_else(|| {\n            crate::StorageErrorKind::NotFound\n                .with_error(anyhow::anyhow!(\"missing file `{}`\", path.display()))\n        })?;\n        let new_range =\n            file_range.start as usize + range.start..file_range.start as usize + range.end;\n        self.storage\n            .get_slice(&self.bundle_filepath, new_range)\n            .await\n    }\n\n    async fn get_slice_stream(\n        &self,\n        path: &Path,\n        _range: Range<usize>,\n    ) -> StorageResult<Box<dyn AsyncRead + Send + Unpin>> {\n        Err(unsupported_operation(&[path]))\n    }\n\n    async fn get_all(&self, path: &Path) -> crate::StorageResult<OwnedBytes> {\n        let file_range = self.file_ranges.get(path).ok_or_else(|| {","sourceCodeStart":495,"sourceCodeEnd":531,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-storage/src/bundle_storage.rs#L495-L531","documentation":"BundleStorage's get_slice looks up the requested path in its in-memory file_ranges map; when the file is not part of the bundle it returns StorageErrorKind::NotFound. Only files recorded in the bundle footer exist through this storage view — the bundle is a single physical file exposing many logical files as byte ranges.","triggerScenarios":"Calling BundleStorage::get_slice (directly or via copy_to) with a path that was never packaged into the bundle, or a path spelled differently from the one recorded at packaging time (leading './', different casing, missing directory prefix).","commonSituations":"A searcher requesting a hotcache/meta file name that does not match the bundled name; version skew where a newer format expects a file absent from bundles written by an older indexer; a bundle footer that was truncated so only some file ranges were parsed.","solutions":["Log the requested path and enumerate self.file_ranges keys to compare exact spellings; fix the caller to use the recorded name.","Verify the bundle's footer parsed completely — a truncated footer yields a partial file_ranges map; re-upload or restore the bundle.","Check for version skew: the requested file may genuinely not exist in bundles written by the deployed indexer version.","Fall back to fetching the file from the standalone storage location if your deployment stores unbundled files."],"exampleFix":"// before: assume the file is always bundled\nlet bytes = bundle_storage.get_slice(path, range).await?;\n// after: check membership first\nif !bundle_storage.exists(path) {\n    return Err(anyhow::anyhow!(\"file {} not in bundle {}\", path, bundle_uri));\n}\nlet bytes = bundle_storage.get_slice(path, range).await?;","handlingStrategy":"validation","validationCode":"if !bundle_storage.exists(path) {\n    anyhow::bail!(\"file {} is not packaged in bundle {}\", path, bundle_storage.uri());\n}","typeGuard":"fn is_bundled(bundle: &BundleStorage, path: &Path) -> bool {\n    bundle.exists(path)\n}","tryCatchPattern":"match bundle_storage.get_slice(path, range).await {\n    Err(e) if e.kind() == quickwit_storage::StorageErrorKind::NotFound => {\n        // fall back or report missing file\n    }\n    other => other?,\n}","preventionTips":["Use the exact file names recorded in the bundle footer, not names reconstructed by hand.","Call exists() before ranged reads on optional files.","Watch for Quickwit version skew between indexer (writer) and searcher (reader)."],"tags":["storage","not-found","bundle-storage"],"backgroundTag":"file-not-found","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}