Skip to content

Conversation

@yeya24
Copy link
Contributor

@yeya24 yeya24 commented Jan 6, 2026

What this PR does:

The current expanded postings cache in Ingester uses context background when fetching postings. This means that the Ingester will keep fetching postings until finish. This changes the behavior before the introduction of expanded postings cache as before Ingester queries will cancel after the configured query timeout.

To avoid fetching postings call running for too long due to very expensive regex queries and causing Ingester CPU issues for too long, this PR tries to introduce a fetch postings timeout to cancel the postings fetch earlier instead of running it forever.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@yeya24 yeya24 force-pushed the expanded-posting-cache-fetch-timeout branch from 9154279 to e1c1a5b Compare January 6, 2026 02:41
Copy link
Member

@SungJin1212 SungJin1212 left a comment

Choose a reason for hiding this comment

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

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 6, 2026
yeya24 added 3 commits January 6, 2026 21:32
Signed-off-by: yeya24 <benye@amazon.com>
Signed-off-by: yeya24 <benye@amazon.com>
Signed-off-by: yeya24 <benye@amazon.com>
@yeya24 yeya24 force-pushed the expanded-posting-cache-fetch-timeout branch from e1c1a5b to 4e4edbe Compare January 7, 2026 05:34
Signed-off-by: Ben Ye <benye@amazon.com>
Copy link
Member

@alanprot alanprot left a comment

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 979b1ef into cortexproject:master Jan 7, 2026
26 of 27 checks passed
@yeya24 yeya24 deleted the expanded-posting-cache-fetch-timeout branch January 7, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size/L type/performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants