Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add context cancellation checks on GetSeries #5827

Merged
merged 3 commits into from
Mar 28, 2024

Conversation

erlan-z
Copy link
Contributor

@erlan-z erlan-z commented Mar 22, 2024

What this PR does:
Add some context cancellation checks on GetSeries

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]

pkg/querier/querier.go Outdated Show resolved Hide resolved
@erlan-z erlan-z force-pushed the context-cancellation-checks branch from 5218578 to f8d0d61 Compare March 22, 2024 17:52
@pull-request-size pull-request-size bot added size/S and removed size/M labels Mar 22, 2024
@erlan-z erlan-z force-pushed the context-cancellation-checks branch 2 times, most recently from c4e20c6 to 9bd12de Compare March 25, 2024 13:20
@erlan-z erlan-z requested a review from alanprot March 25, 2024 20:32
Comment on lines 568 to 570
if ctx.Err() != nil {
return storage.ErrSeriesSet(ctx.Err())
}
Copy link
Member

Choose a reason for hiding this comment

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

I think we did something similar and thanos and the perf was ok, right @yeya24 ?

Copy link
Contributor

Choose a reason for hiding this comment

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

We have something like this when expanding postings. No obvious impact.

Comment on lines 568 to 570
if ctx.Err() != nil {
return storage.ErrSeriesSet(ctx.Err())
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We have something like this when expanding postings. No obvious impact.

pkg/querier/querier.go Outdated Show resolved Hide resolved
@erlan-z erlan-z force-pushed the context-cancellation-checks branch 2 times, most recently from 78a8848 to 8328536 Compare March 26, 2024 19:09
@erlan-z erlan-z requested a review from alanprot March 26, 2024 22:46
Signed-off-by: Erlan Zholdubai uulu <erlanz@amazon.com>
@erlan-z erlan-z force-pushed the context-cancellation-checks branch from 8328536 to 74d2af2 Compare March 27, 2024 20:32
Signed-off-by: Erlan Zholdubai uulu <erlanz@amazon.com>
@erlan-z erlan-z requested a review from yeya24 March 27, 2024 21:01
Copy link
Contributor

@yeya24 yeya24 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 enabled auto-merge (squash) March 27, 2024 21:31
@yeya24
Copy link
Contributor

yeya24 commented Mar 27, 2024

@erlan-z Can you update changelog please?

@yeya24 yeya24 disabled auto-merge March 27, 2024 21:32
Signed-off-by: Erlan Zholdubai uulu <erlanz@amazon.com>
@erlan-z erlan-z force-pushed the context-cancellation-checks branch from b730522 to bf18092 Compare March 27, 2024 21:56
@yeya24
Copy link
Contributor

yeya24 commented Mar 28, 2024

I feel we might also miss some context check at storage.NewMergeSeriesSet. But let's see if this problem still reproducible after this change and we can improve later.

@yeya24 yeya24 merged commit a5fa68d into cortexproject:master Mar 28, 2024
16 checks passed
@erlan-z erlan-z deleted the context-cancellation-checks branch March 28, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants