Skip to content

fix(storage): validate named S3 backend names & remove lock-across-await#4

Merged
papaharry merged 1 commit into
mainfrom
fix/s3-named-scheme-and-client-lock
Jun 19, 2026
Merged

fix(storage): validate named S3 backend names & remove lock-across-await#4
papaharry merged 1 commit into
mainfrom
fix/s3-named-scheme-and-client-lock

Conversation

@papaharry

Copy link
Copy Markdown
Collaborator

Two fixes for the named S3 backend feature.

  • config: reject URL-incompatible named-backend names at config load (StorageConfigs::validate). The name is embedded in the s3+<name>:// URI scheme, which the metrics/DataFusion path parses with url::Url; restricted to lowercase ASCII alnum and - so it fails fast at startup instead of at query time.
  • storage: cache each named backend behind its own OnceCell; the (now std) mutex is held only synchronously to fetch/insert the cell, never across the client build, so independent backends initialize concurrently.

Tests: name validation unit tests (config). clippy clean, fmt clean, quickwit-config 104/104 and quickwit-storage 65/65 lib tests pass. Resolver change is compile-checked only (no runtime test).

…wait

- config: reject URL-incompatible named-backend names at config load; the
  name is embedded in the s3+<name>:// scheme which the metrics/DataFusion
  path parses with url::Url. Restricted to lowercase ASCII alnum and `-`.
- storage: cache each named backend behind its own OnceCell; the mutex is
  held only synchronously to fetch/insert the cell, never across the client
  build, so independent backends initialize concurrently.
@papaharry papaharry merged commit 627c913 into main Jun 19, 2026
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.

1 participant