Skip to content

docs(compactor): document global and per-tenant blocks retention#7722

Open
Goutham-Annem wants to merge 1 commit into
cortexproject:masterfrom
Goutham-Annem:docs/3926-per-tenant-retention
Open

docs(compactor): document global and per-tenant blocks retention#7722
Goutham-Annem wants to merge 1 commit into
cortexproject:masterfrom
Goutham-Annem:docs/3926-per-tenant-retention

Conversation

@Goutham-Annem

Copy link
Copy Markdown

What this PR does:

Adds a new Blocks retention section to the compactor documentation (docs/blocks-storage/compactor.md and its source template) covering:

  • Global retention — how to configure -compactor.blocks-retention-period with a worked YAML example.
  • Per-tenant retention — how to set compactor_blocks_retention_period per tenant via the runtime config overrides, with a clear note that a value of 0 means "keep indefinitely" (not "inherit global default").
  • Retention and querying — the recommended -querier.max-query-lookback setting to avoid queries reaching into already-deleted blocks.

Which issue(s) this PR fixes:
Fixes #3926

Checklist

  • Tests updated (no code changes; docs only)
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
  • docs/configuration/v1-guarantees.md updated if this PR introduces experimental flags (N/A — no new flags)

Note: This PR was developed with AI assistance (Claude Code).

Add a new 'Blocks retention' section to the compactor documentation
covering:
- Global retention via -compactor.blocks-retention-period
- Per-tenant retention via compactor_blocks_retention_period runtime
  config override, with an example runtime config YAML
- Recommendation to set -querier.max-query-lookback alongside retention
  to avoid querying deleted blocks

Fixes cortexproject#3926

Signed-off-by: Goutham Annem <gouthemannem@gmail.com>
@dosubot dosubot Bot added component/compactor component/documentation type/chore Something that needs to be done; not a bug or a feature labels Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/compactor component/documentation size/M type/chore Something that needs to be done; not a bug or a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document blocks storage per-tenant retention

1 participant