{"record":{"id":"aaf9a695730bf01e","repo":"quickwit-oss/quickwit","slug":"missing-file-in-split-bundle","errorCode":null,"errorMessage":"missing file `{}` in split bundle","messagePattern":"missing file `(.+?)` in split bundle","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-storage/src/bundle_storage.rs","lineNumber":125,"sourceCode":"        storage: Arc<dyn Storage>,\n        bundle_filepath: PathBuf,\n        split_path: &Path,\n        split_len: u64,\n    ) -> anyhow::Result<(OwnedBytes, Range<u64>)> {\n        let (split_bytes, footer_range) = fetch_split_tail(\n            storage.as_ref(),\n            split_path,\n            split_len,\n            DEFAULT_SPLIT_TAIL_WINDOW_NUM_BYTES,\n        )\n        .await?;\n\n        // Parse the bundle file ranges from the split bytes.\n        let tail_start = split_len - split_bytes.len() as u64;\n        let (file_ranges, _hotcache) =\n            BundleFileRanges::open_from_split_bytes(split_bytes.clone())?;\n        let file_range = file_ranges.get(&bundle_filepath).ok_or_else(|| {\n            anyhow::anyhow!(\n                \"missing file `{}` in split bundle\",\n                bundle_filepath.display()\n            )\n        })?;\n        ensure!(\n            file_range.start <= file_range.end,\n            \"bundled file range starts after it ends\"\n        );\n        ensure!(\n            file_range.end <= footer_range.start,\n            \"bundled file range overlaps split footer\"\n        );\n\n        // If the initial tail also contains the file, reuse it and complete in one GET (at least).\n        // Otherwise, fetch the file with an additional GET.\n        let file_bytes = if file_range.start >= tail_start {\n            let relative_start = (file_range.start - tail_start) as usize;\n            let relative_end = (file_range.end - tail_start) as usize;","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-storage/src/bundle_storage.rs#L107-L143","documentation":"Quickwit packs multiple files (hotcache, postings, etc.) into a single split bundle file. fetch_file_from_split reads the split tail, parses the embedded BundleFileRanges directory, and looks up the requested path. If the requested file path is not among the bundle's recorded ranges, this error is returned, meaning the file isn't present in this split bundle.","triggerScenarios":"Calling fetch_file_from_split (via BundleStorage open/read of a bundled file) with a bundle_filepath that was not packed into the split — wrong file path, file belonging to a different split, or a split written by an older format lacking the file.","commonSituations":"Search/merge code requesting hotcache or auxiliary files from a split where they don't exist; version mismatch between split format and reader; corrupted or truncated split bundles whose directory parsed but is incomplete.","solutions":["Verify the file path exists in the split: list the split's contents (e.g. via quickwit tool inspect-split / extract-split) before fetching.","Ensure you are reading the correct split file for the requested resource — the file may live in another split.","Re-download or re-stage the split if it may be corrupted/truncated, then retry.","If old splits lack the file, re-index or migrate splits to the current format."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// List bundle contents before fetching\nlet contents = split_inspector.list_files(split_id).await?;\nif !contents.contains(file_path) { return Err(anyhow!(\"{file_path} not in split {split_id}\")); }","typeGuard":null,"tryCatchPattern":"match storage.fetch_file_from_split(split_path, file_path).await {\n    Err(e) if e.to_string().contains(\"missing file\") => {\n        // fall back to the standalone (non-bundled) file path\n        storage.get_slice(&standalone_path, range).await\n    }\n    r => r,\n}","preventionTips":["Verify the requested file exists in the split (inspect-split) before reading","Ensure readers and writers use the same split format version","Checksum splits on download to catch truncation/corruption","Route requests for a file to the split that actually contains it"],"tags":["rust","storage","splits","bundle"],"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-14T11:17:12.474Z"}