{"record":{"id":"c7963b70ec7f49b4","repo":"quickwit-oss/quickwit","slug":"failed-to-locate-split-footer-after-reading-bundle","errorCode":null,"errorMessage":"failed to locate split footer after reading bundle metadata length","messagePattern":"failed to locate split footer after reading bundle metadata length","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-storage/src/bundle_storage.rs","lineNumber":335,"sourceCode":"    let mut tail_bytes =\n        read_split_tail(storage, split_path, split_len, initial_tail_num_bytes).await?;\n\n    // Locate the footer range.\n    let footer_range = match locate_split_footer_range_in_tail(split_len, &tail_bytes)? {\n        FooterLocation::Located(footer_range) => {\n            // The range is known, but the initial tail may not contain the complete footer.\n            footer_range\n        }\n        FooterLocation::ReadBundleMetadataLen(bundle_metadata_len_range) => {\n            // Extend the tail through the legacy bundle-metadata length field, then use that\n            // length to locate the beginning of the footer.\n            let required_tail_num_bytes = split_len - bundle_metadata_len_range.start;\n            let metadata_len_tail_bytes =\n                read_split_tail(storage, split_path, split_len, required_tail_num_bytes).await?;\n            match locate_split_footer_range_in_tail(split_len, &metadata_len_tail_bytes)? {\n                FooterLocation::Located(footer_range) => footer_range,\n                FooterLocation::ReadBundleMetadataLen(_) => {\n                    bail!(\"failed to locate split footer after reading bundle metadata length\");\n                }\n            }\n        }\n    };\n\n    // If the initial tail does not contain the entire footer, fetch the exact footer range now\n    // that its boundaries are known.\n    let footer_num_bytes = footer_range.end - footer_range.start;\n    if (tail_bytes.len() as u64) < footer_num_bytes {\n        tail_bytes = read_split_tail(storage, split_path, split_len, footer_num_bytes).await?;\n    }\n    Ok((tail_bytes, footer_range))\n}\n\nasync fn read_split_tail(\n    storage: &dyn Storage,\n    split_path: &Path,\n    split_len: u64,","sourceCodeStart":317,"sourceCodeEnd":353,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-storage/src/bundle_storage.rs#L317-L353","documentation":"Hotcache/split fetch reads the split's tail to locate the bundle footer. After re-reading an extended tail that includes the bundle metadata length, `locate_split_footer_range_in_tail` still could not produce a Located footer range. This means the split tail bytes do not contain a consistent bundle/footer structure, so `fetch_split_tail` aborts instead of guessing offsets.","triggerScenarios":"Calling fetch_file_from_split on a split whose tail was truncated/corrupted, whose footer was overwritten, or whose on-disk format predates/differs from the footer layout the reader expects, such that even after reading the bundle metadata length the footer range can't be located.","commonSituations":"Partially uploaded or truncated splits in object storage; corrupted split files; version mismatch between the code reading splits and splits written by an older Quickwit format.","solutions":["Verify split integrity (footer/checksum); re-upload or re-index the split from source data.","Confirm the split was written by a compatible Quickwit version; upgrade or downgrade as needed.","Check storage consistency: retry the fetch if a transient partial read is suspected, then treat persistent failure as corruption."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match fetch_file_from_split(...).await {\n    Err(e) if e.to_string().contains(\"failed to locate split footer\") => {\n        // mark split as corrupted, trigger re-index\n    }\n    other => other?,\n}","preventionTips":["Verify checksums after split upload to object storage.","Pin a consistent quickwit version between writers and readers."],"tags":["storage","corruption","split-footer"],"backgroundTag":"checksum-mismatch","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"}