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

[pull] main from thanos-io:main #474

Merged
merged 2 commits into from
Jan 3, 2025
Merged

[pull] main from thanos-io:main #474

merged 2 commits into from
Jan 3, 2025

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 3, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

pedro-stanaka and others added 2 commits January 3, 2025 09:59
* Receiver: cache matchers for series calls

We have tried caching matchers before with a time-based expiration cache, this time we are trying with LRU cache.

We saw some of our receivers busy with compiling regexes and with high CPU usage, similar to the profile of the benchmark I added here:

* Adding matcher cache for method `MatchersToPromMatchers` and a new version which uses the cache.
* The main change is in `matchesExternalLabels` function which now receives a cache instance.

adding matcher cache and refactor matchers

Co-authored-by: Andre Branchizio <[email protected]>

Signed-off-by: Pedro Tanaka <[email protected]>

Using the cache in proxy and tsdb stores (only receiver)

Signed-off-by: Pedro Tanaka <[email protected]>

fixing problem with deep equality

Signed-off-by: Pedro Tanaka <[email protected]>

adding some docs

Signed-off-by: Pedro Tanaka <[email protected]>

Adding benchmark

Signed-off-by: Pedro Tanaka <[email protected]>

undo unecessary changes

Signed-off-by: Pedro Tanaka <[email protected]>

Adjusting metric names

Signed-off-by: Pedro Tanaka <[email protected]>

adding changelog

Signed-off-by: Pedro Tanaka <[email protected]>

wiring changes to the receiver

Signed-off-by: Pedro Tanaka <[email protected]>

Fixing linting

Signed-off-by: Pedro Tanaka <[email protected]>

docs

Signed-off-by: Pedro Tanaka <[email protected]>

* using singleflight to get or set items

Signed-off-by: Pedro Tanaka <[email protected]>

* improve metrics

Signed-off-by: Pedro Tanaka <[email protected]>

* Introduce interface for matchers cache

Signed-off-by: Pedro Tanaka <[email protected]>

* fixing unit test

Signed-off-by: Pedro Tanaka <[email protected]>

* adding changelog

Signed-off-by: Pedro Tanaka <[email protected]>

* fixing benchmark

Signed-off-by: Pedro Tanaka <[email protected]>

* moving matcher cache to storecache package

Signed-off-by: Pedro Tanaka <[email protected]>

* Trying to make the cache more reusable introducing interface

Signed-off-by: Pedro Tanaka <[email protected]>

Fixing problem with wrong initialization

Signed-off-by: Pedro Tanaka <[email protected]>

Moving interface to storecache package

Signed-off-by: Pedro Tanaka <[email protected]>

remove empty file and fix calls to constructor passing nil;

Signed-off-by: Pedro Tanaka <[email protected]>

* Fix false entry on change log

Signed-off-by: Pedro Tanaka <[email protected]>

* Removing default value for registry and rename test file

Signed-off-by: Pedro Tanaka <[email protected]>

* Using fmt.Errf()

Signed-off-by: Pedro Tanaka <[email protected]>

* Remove method that is not on interface anymore

Signed-off-by: Pedro Tanaka <[email protected]>

* Remove duplicate get call

Signed-off-by: Pedro Tanaka <[email protected]>

---------

Signed-off-by: Pedro Tanaka <[email protected]>
Signed-off-by: Pedro Tanaka <[email protected]>
Signed-off-by: Roberto O. Fernández Crisial <[email protected]>
Signed-off-by: Roberto O. Fernández Crisial <[email protected]>
@pull pull bot added the ⤵️ pull label Jan 3, 2025
@pull pull bot merged commit 803556c into yeya24:main Jan 3, 2025
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.

2 participants