Commit graph

20 commits

Author SHA1 Message Date
Dimitar Dimitrov f388b77fdc
Fix tests 2023-12-13 10:49:30 +01:00
Arve Knudsen 476ebcb0a6 Adjust benchmark
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-11-09 16:58:06 +01:00
Arve Knudsen e3b8667fb1 Increase number of postings in benchmark
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-11-09 16:58:06 +01:00
György Krajcsovits 1149f7e9e1 Fix lint errors: dot at comment end
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-11-02 21:09:38 +01:00
Arve Knudsen 6a4a87271b PostingsForMatchersCache test improvements
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-10-24 17:46:52 +02:00
Arve Knudsen efcd876b50 Ensure deterministic execution, for tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-10-20 16:21:26 +02:00
Charles Korn 8df8db6c73
Add failing test
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2023-10-20 15:48:12 +11:00
Arve Knudsen 35ab75918a Merge remote-tracking branch 'prometheus/main' into arve/upgrade-exp
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-10-06 16:11:40 +02:00
Oleg Zaytsev 5fdf784243 Refactor PostingsForMatcherCache promise
Extract promise payload as a struct, to make size calculation easier.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-09-28 11:44:03 +02:00
Marco Pracucci a5d218d53d
Configure the 'high eviction' benchmark to always evict
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-28 11:12:40 +02:00
Marco Pracucci 8d92930140
Make the benchmark more realistic, returning some postings
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-28 10:46:22 +02:00
Marco Pracucci 2986a7a4ba
Added BenchmarkPostingsForMatchersCache
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-27 16:17:08 +02:00
Marco Pracucci 3c68ce252e
Add PostingsForMatchers cache size by bytes support
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-27 15:25:39 +02:00
Arve Knudsen 85df1d4013 Merge remote-tracking branch 'prometheus/main' into chore/sync-prometheus
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-09-21 09:19:23 +02:00
Arve Knudsen e48d4e5835 Merge remote-tracking branch 'prometheus/main' into chore/sync-prometheus
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-09-18 09:29:42 +02:00
György Krajcsovits 87c727e957 Fix linter errors in Grafana additions
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-04-28 16:32:42 +02:00
Oleg Zaytsev d23859dee2
Allow forcing usage of PostingsForMatchersCache
When out-of-order is enabled, queries go through both Head and OOOHead,
and they both execute the same PostingsForMatchers call, as memSeries
are shared for both.

In some cases these calls can be heavy, and also frequent. We can
deduplicate those calls by using the PostingsForMatchers cache that we
already use for query sharding.

The usage of this cache can skip a newly appended series in the results
for the duration of the ttl.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2022-12-28 13:44:10 +01:00
Jesus Vazquez 51f26e0cba Necessary changes to make the merge work
This commit disables some unused workflows on our CI.

Also uses grafana/regexp instead of regexp which is blackisted.

Also updates head_test TestHeadReadWriterRepair increasing
ChunkWriteQueueSize to 1 so that the chunk disk mapper uses the async
queue. This seems to be default behaviour in upstream prometheus and
without this option our test fails.
2022-04-13 14:45:43 +02:00
Peter Štibraný 294c155bb6 Merge remote-tracking branch 'upstream/main' into merge-upstream 2021-11-18 15:48:40 +01:00
Christian Simon 50c1060328
Implement PostingsCloner and implement promise/future pattern for PostingsForMatchers (#14)
* Fix tests not closing head/block properly

Close Head properly in TestWalRepair_DecodingError
Close Block properly in  TestReadIndexFormatV1

Co-authored-by: Christian Simon <simon@swine.de>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>

* Implement PostingsCloner

PostingsCloner allows obtaining independend clones of a Postings, that
can be used for subsequent calls.

Co-authored-by: Christian Simon <simon@swine.de>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>

* IndexReader.PostingsForMatchers() and implement Cache

IndexReader now offers the PostingsForMatchers functionality, which is
provided by PostingsForMatchersCache.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Co-authored-by: Marco Pracucci <marco@pracucci.com>
Co-authored-by: Peter Štibraný <peter.stibrany@grafana.com>

Co-authored-by: Oleg Zaytsev <mail@olegzaytsev.com>
Co-authored-by: Marco Pracucci <marco@pracucci.com>
Co-authored-by: Peter Štibraný <peter.stibrany@grafana.com>
2021-10-07 15:16:09 +02:00