quickwit-oss/quickwit · error

bundled file range starts after it ends

Error message

bundled file range starts after it ends

What it means

While fetching a file stored inside a split bundle, the bundle storage looks up the file's byte range and checks it is well-formed (start <= end). A range with start > end is structurally impossible from correct writers, so this indicates a corrupted split bundle footer/metadata. The library refuses to issue a nonsensical GET.

Source

Thrown at quickwit/quickwit-storage/src/bundle_storage.rs:130

        let (split_bytes, footer_range) = fetch_split_tail(
            storage.as_ref(),
            split_path,
            split_len,
            DEFAULT_SPLIT_TAIL_WINDOW_NUM_BYTES,
        )
        .await?;

        // Parse the bundle file ranges from the split bytes.
        let tail_start = split_len - split_bytes.len() as u64;
        let (file_ranges, _hotcache) =
            BundleFileRanges::open_from_split_bytes(split_bytes.clone())?;
        let file_range = file_ranges.get(&bundle_filepath).ok_or_else(|| {
            anyhow::anyhow!(
                "missing file `{}` in split bundle",
                bundle_filepath.display()
            )
        })?;
        ensure!(
            file_range.start <= file_range.end,
            "bundled file range starts after it ends"
        );
        ensure!(
            file_range.end <= footer_range.start,
            "bundled file range overlaps split footer"
        );

        // If the initial tail also contains the file, reuse it and complete in one GET (at least).
        // Otherwise, fetch the file with an additional GET.
        let file_bytes = if file_range.start >= tail_start {
            let relative_start = (file_range.start - tail_start) as usize;
            let relative_end = (file_range.end - tail_start) as usize;
            split_bytes.slice(relative_start..relative_end)
        } else {
            let relative_start = file_range.start as usize;
            let relative_end = file_range.end as usize;
            storage

View on GitHub (pinned to a39730c5cd)

Solutions

  1. Re-upload or re-index the affected split to regenerate correct bundle metadata.
  2. Verify the split file's integrity (checksum) against its source; replace it if corrupted.
  3. Check the Quickwit version that wrote the split; upgrade if a known writer bug produced bad ranges.
Defensive patterns

Strategy: try-catch

Try / catch

match bundle_storage.fetch_file_from_split(split, path).await {
    Ok(bytes) => bytes,
    Err(e) if e.to_string().contains("bundled file range") => {
        // mark split as corrupted, trigger re-index/re-upload
    }
    Err(e) => return Err(e.into()),
}

Prevention

When it happens

Trigger: Calling `fetch_file_from_split` on a split whose bundle metadata maps the requested file to an inverted byte range (start > end), produced by corrupted bundle metadata or a writer bug.

Common situations: Split files corrupted in transit or in object storage; splits written by a buggy or mismatched Quickwit version; truncated then manually patched bundle metadata.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08). Data as JSON: /api/errors/10e55635d0479e39. Report an issue: GitHub.