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

Matcher cache/series #8045

Merged
merged 9 commits into from
Jan 7, 2025
Merged

Matcher cache/series #8045

merged 9 commits into from
Jan 7, 2025

Conversation

alanprot
Copy link
Contributor

@alanprot alanprot commented Jan 7, 2025

Changes

Implementing the same matcher cache from #7353 but for store-gateways.

There also 2 small changes on the cr:

  • Avoid creating the NoopCache struct for every call
  • Fix maxItems metric

Verification

Unit test was update to use the cache.

@alanprot alanprot force-pushed the matcher-cache/Series branch from 79db03f to 3e2e473 Compare January 7, 2025 02:02
cmd/thanos/store.go Outdated Show resolved Hide resolved
Signed-off-by: alanprot <[email protected]>
@alanprot
Copy link
Contributor Author

alanprot commented Jan 7, 2025

BTW: I think we should only cache regex matchers, as they are the only ones that can be problematic.

WDYT @pedro-stanaka @yeya24 ?

Signed-off-by: alanprot <[email protected]>
Signed-off-by: alanprot <[email protected]>
@pedro-stanaka
Copy link
Contributor

pedro-stanaka commented Jan 7, 2025

First of all, thanks for wrapping up this work.

BTW: I think we should only cache regex matchers, as they are the only ones that can be problematic.

WDYT @pedro-stanaka @yeya24 ?

I agree with this, maybe we can do it in a follow up. The failure on unit test seems legit.

Signed-off-by: alanprot <[email protected]>
@alanprot
Copy link
Contributor Author

alanprot commented Jan 7, 2025

The failure on unit test seems legit.

It was a problem in the test. Fixed.

@pull-request-size pull-request-size bot added size/L and removed size/M labels Jan 7, 2025
@alanprot alanprot force-pushed the matcher-cache/Series branch from 7126b9a to 602eda9 Compare January 7, 2025 19:38
Signed-off-by: alanprot <[email protected]>
@yeya24 yeya24 enabled auto-merge (squash) January 7, 2025 22:01
@yeya24 yeya24 merged commit 0d42636 into thanos-io:main Jan 7, 2025
22 checks passed
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