Skip to content

bugfix per tenant cache ttl fallback - #7775

Merged
yeya24 merged 4 commits into
cortexproject:masterfrom
Shvejan:cache-ttl-bug-fix
Aug 26, 2026
Merged

bugfix per tenant cache ttl fallback#7775
yeya24 merged 4 commits into
cortexproject:masterfrom
Shvejan:cache-ttl-bug-fix

Conversation

@Shvejan

@Shvejan Shvejan commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

What this PR does:
Makes out_of_order_results_cache_ttl fall back to results_cache_ttl before falling back to the global cache backend TTL.

Previously, a tenant that set only results_cache_ttl got that TTL for data outside the out-of-order window, but the global backend TTL for data inside
it. The fallback is resolved per-tenant before aggregating across tenants, since SmallestPositiveNonZeroDurationPerTenant discards zeros and would
otherwise lose track of which tenant left the value unset.

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

Checklist
[BUGFIX]

  • docs/configuration/v1-guarantees.md updated if this PR introduces experimental flags

@dosubot dosubot Bot added the type/bug label Aug 17, 2026
@CharlieTLe
CharlieTLe requested review from a team and yeya24 and removed request for a team August 21, 2026 18:27
Signed-off-by: Shvejan Mutheboyina <shvejan@amazon.com>
Signed-off-by: Shvejan Mutheboyina <shvejan@amazon.com>
@Shvejan
Shvejan force-pushed the cache-ttl-bug-fix branch from 1882f96 to d670427 Compare August 24, 2026 00:24
@Shvejan
Shvejan requested a review from a team as a code owner August 24, 2026 00:24
Signed-off-by: Shvejan <49836470+Shvejan@users.noreply.github.com>
Comment thread pkg/querier/tripperware/queryrange/results_cache.go Outdated
Comment thread CHANGELOG.md Outdated
Signed-off-by: Shvejan Mutheboyina <shvejan@amazon.com>
@Shvejan
Shvejan force-pushed the cache-ttl-bug-fix branch from e107084 to a146e9e Compare August 25, 2026 23:44

@yeya24 yeya24 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks

@yeya24
yeya24 merged commit de3ed5a into cortexproject:master Aug 26, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Query Frontend: out_of_order_results_cache_ttl does not fall back to results_cache_ttl

2 participants