Skip to content

Filter lexical siblings from prefixed listings - #6713

Merged
Mallets merged 3 commits into
mainfrom
mallets/fix-list
Aug 20, 2026
Merged

Filter lexical siblings from prefixed listings#6713
Mallets merged 3 commits into
mainfrom
mallets/fix-list

Conversation

@Mallets

@Mallets Mallets commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Description

From an independent codex CI:

Skip lexical siblings when stripping the storage prefix

When list("") wraps an implementation with byte-prefix semantics, the underlying call may validly return a lexical sibling such as indexes-old/object for the requested prefix indexes (the S3 implementation explicitly handles this case). Path::strip_prefix rejects that object and turns the entire page into an internal error, so listing the prefixed storage can fail because of an unrelated sibling object. Filter objects outside the component-level storage root instead of returning an error for the batch.

PrefixStorage::list now filters lexical siblings outside its component-level storage root before stripping the prefix. This prevents byte-prefix backends such as S3 from failing an entire listing page when they return a lexical sibling (for example, indexes-old/object while listing indexes). Unrelated out-of-prefix paths still produce an internal error so backend contract violations are not hidden.

Adds regression tests for both lexical siblings and unrelated paths.

Follow-up to #6705.

How was this PR tested?

  • make fmt
  • cargo check -p quickwit-storage --lib
  • Attempted cargo nextest run -p quickwit-storage prefix_storage --retries 1; test compilation is currently blocked on main by aws-smithy-http-client enabling serde_json/preserve_order, which triggers the existing compile-time assertion in quickwit-storage/src/lib.rs.

@Mallets
Mallets marked this pull request as ready for review August 20, 2026 10:15
@Mallets
Mallets requested a review from a team as a code owner August 20, 2026 10:15

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 07111fbf73

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread quickwit/quickwit-storage/src/prefix_storage.rs Outdated
Filter byte-prefix lexical siblings while surfacing objects returned outside the storage prefix.
@Mallets
Mallets merged commit dc77b01 into main Aug 20, 2026
9 checks passed
@Mallets
Mallets deleted the mallets/fix-list branch August 20, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants