feat: add list_objects_version option to S3 backend - #7517
Conversation
|
I encountered the same problem,hope this issue be merged soon |
f63b5cb to
2b03e97
Compare
| # Optional. Default is v2. | ||
| # Use a specific version of the S3 list objects API. Supported values are v1 and v2. | ||
| # Set to v1 for S3-compatible stores that do not implement ListObjectsV2 pagination correctly. | ||
| [list_objects_version: <string>] |
There was a problem hiding this comment.
Thank you for adding docs!
| metadata: {} | ||
| native_aws_auth_enabled: false | ||
| list_blocks_concurrency: 3 | ||
| list_objects_version: v2 |
There was a problem hiding this comment.
The manifest.md is a generated doc. Any changes that you make to it will be overwritten next time the file is generated.
There was a problem hiding this comment.
Thanks for flagging! These lines weren't hand-edited — they come from running make generate-manifest (go run pkg/docsgen/generate_manifest.go) on the branch, so they match what the generator emits for the new option. I re-ran it after rebasing on latest main and the tree stays clean, so the next regeneration keeps them.
|
An additional question regarding this: if limit = 0 is changed to a non-zero value (such as 100), what are the behavioral differences between v1 and v2? I'm planning to open a PR to apply this limit, see #7598 |
2b03e97 to
b2e258a
Compare
|
Good question. With a non-zero max-keys the two versions behave the same from the caller's perspective: S3 caps every page at min(max-keys, 1000), so a smaller limit just means more round-trips. What differs is only the cursor mechanics, which this PR already normalizes: V2 advances via |
|
@electron0zero would you have a moment to review? This is the pagination-side counterpart of the S3-compatible-store issues you triaged in #6436: some stores truncate |
b2e258a to
3c9fd3e
Compare
What this PR does:
Adds an optional
list_objects_versionsetting to the S3 backend, letting operators select the V1 (ListObjects, marker-based) list API instead ofListObjectsV2. The default is unchanged — V2 — so existing deployments are unaffected; only backends that explicitly setlist_objects_version: v1change behavior.Some S3-compatible stores return a truncated
ListObjectsV2response without aNextContinuationToken. The backend cannot paginate that response, so the blocklist poller fails inListBlocks/Findand the block list is never built. Known affected backends include Ceph RGW (pre-Nautilus, e.g. mimic 13.2.2 — Ceph tracker #37801), Dell ECS (#5703, #558), and RustFS / some MinIO and ECS configurations (#6436). The V1 marker-based list API paginates correctly on these stores.This is the same
list_objects_versionoption already exposed across the Grafana stack — Mimir (#5099), Cortex (#6280), and Thanos/objstore (#3312) — with the same name and values, so the knob is consistent for operators running Tempo alongside them. Tempo calls minio-go's low-levelCoreAPI directly (it does not vendor objstore), so the switch is implemented at the twoListObjectsV2call sites rather than passed through.V1 is opt-in only and the default stays V2; V2 remains the recommended, more efficient path, and the option description notes the tradeoff. This is distinct from #6114, which set
maxKeys=1on the startup confirmation list — that change does not touch the blocklist poller'sListBlocks/Findpagination, which is what this option addresses.Which issue(s) this PR fixes:
Related to #5703, #6436
Checklist
.chloggen/(runmake chlog-new, ormake chlog-new FILENAME=<name>to override the default branch-name file; see.chloggen/README.md)