Oleg Zaytsev
8c43257d39
Merge pull request #538 from grafana/fix-BenchmarkOptimizeEqualStringMatchers
...
Fix BenchmarkOptimizeEqualStringMatchers
2023-10-02 12:30:16 +02:00
Oleg Zaytsev
cd91345b76
Fix BenchmarkOptimizeEqualStringMatchers
...
The logic has changed, and we create a slice-based matcher for smaller
number of alternations. This fixes the benchmark.
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-10-02 12:00:18 +02:00
Marco Pracucci
c7c149e1d9
Merge pull request #537 from grafana/more-regexp-optimizations-with-dot-quest-support
...
Optimize .? in the FastRegexMatcher
2023-10-02 09:10:56 +02:00
Marco Pracucci
5d7eb6d8f9
Make linter happy
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-29 15:33:38 +02:00
Marco Pracucci
0df8e0fac1
Clarify ordering
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-29 15:33:38 +02:00
Marco Pracucci
79640b3eaf
Optimize .? in the FastRegexMatcher
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-29 15:33:36 +02:00
Marco Pracucci
5e1fe508c7
Merge pull request #536 from grafana/more-regexp-optimizations
...
Optimize regexp matcher with list of alternations ending with .*
2023-09-29 15:32:45 +02:00
Marco Pracucci
3ed2ca3c4c
Address offline feedback
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-29 15:14:37 +02:00
Marco Pracucci
5ae9c194ce
Fix
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-29 14:17:17 +02:00
Marco Pracucci
c28d940234
Improved regexp matcher in TestAnalyzeRealQueries
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-29 12:48:55 +02:00
Marco Pracucci
20c56ae9e0
Revert change
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-29 12:26:00 +02:00
Marco Pracucci
fe9124ffa3
Optimize regexp matcher with list of alternations ending with .*
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-29 12:21:30 +02:00
Marco Pracucci
2c3445115a
Merge pull request #535 from grafana/refactor-postings-for-matchers-promise
...
Refactor PostingsForMatcherCache promise
2023-09-28 12:26:33 +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
241a342b33
Merge pull request #533 from grafana/add-postings-matchers-cache-max-bytes-support
...
Add PostingsForMatchers cache size by bytes support
2023-09-28 11:31:08 +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
d2f7ecbaba
Merge pull request #534 from grafana/label-values-with-matchers-is-bypassing-cache
...
`LabelValues()` with matchers should use cache
2023-09-28 10:47:45 +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
9bcca44ac4
Addressed review comments
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-28 10:32:19 +02:00
Oleg Zaytsev
a8c31f279f
Test that IndexReader.PostingsForMatchers is called
...
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-09-28 10:22:37 +02:00
Oleg Zaytsev
664c125d87
LabelValues() with matchers should use cache
...
When cache was introduced, LabelValues() could never be called with
"concurrent" flag so it didn't make sense to use the cached call through
the Head. However, since the introduction of forced cache, we should use
it, as even with concurrent=false the cache may be used.
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-09-27 18:33:18 +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
0a8b79ad29
Do not measure size of sync.WaitGroup
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-27 15:50:39 +02:00
Marco Pracucci
e2c1e7aadc
Fix typo
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-27 15:33:15 +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
320f0c9c4a
Merge pull request #531 from grafana/chore/sync-prometheus
...
Sync with latest Prometheus upstream
2023-09-21 10:11:26 +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
Bryan Boreham
91054875d6
Merge pull request #12732 from bboreham/simplify-rangeeval
...
promql: simplify inner loop of rangeEval
2023-09-20 20:22:05 +00:00
Bryan Boreham
d498bb0d8c
Merge pull request #12875 from dimitarvdimitrov/dimitar/TestQuerierIndexQueriesRace-incorrect-exit-condition
...
Fix samples generation in TestQuerierIndexQueriesRace
The loop would run forever if the context was cancelled before the goroutine got started.
2023-09-20 20:20:30 +00:00
Dimitar Dimitrov
6f1284ac93
Fix exit condition of TestQuerierIndexQueriesRace
...
The test was introduced in # but was changed during the code review and not reran with the faulty code since then.
Closes #
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
2023-09-20 20:22:26 +01:00
Bryan Boreham
bca9a79bca
Merge pull request #12877 from bboreham/fix-promtool
...
promtool: fix compile error from bad merge
2023-09-20 19:14:30 +00:00
Bryan Boreham
5ecea3c840
promtool: fix compile error from bad merge
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-09-20 16:34:20 +00:00
Björn Rabenstein
864da019cd
Merge pull request #12874 from krajorama/outof-order-chunks
...
Fix duplicate sample detection at chunk size limit
2023-09-20 18:01:21 +02:00
Björn Rabenstein
9071913fd9
Merge pull request #12831 from aknuds1/arve/posting-context
...
Add context argument to `tsdb.PostingsForMatchers`
2023-09-20 17:15:15 +02:00
Bryan Boreham
2b77ad4591
Merge pull request #12677 from bboreham/retry-on-500
...
remote-write: respect Retry-After header on 5xx errors
2023-09-20 14:02:34 +00:00
György Krajcsovits
9dbd100a5e
Refactor solution to not repeat code
...
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-09-20 15:54:00 +02:00
György Krajcsovits
96d03b6f46
Fix duplicate sample detection at chunks size limit
...
Before cutting a new XOR chunk in case the chunk goes over the size
limit, check that the timestamp is in order and not equal or older
than the latest sample in the old chunk.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-09-20 14:49:56 +02:00
György Krajcsovits
56b3a015b6
Add regression test for duplicate detection at chunk size limit
...
TestHeadDetectsDuplcateSampleAtSizeLimit tests a regression where a
duplicate sample,is appended to the head, right when the head chunk is
at the size limit. The test adds all samples as duplicate, thus
expecting that the result has exactly half of the samples.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-09-20 14:32:20 +02:00
Ben Ye
c78124427e
Support specifying series matchers to analyze tsdb ( #12842 )
...
* support specifying series matchers to analyze tsdb
Signed-off-by: Ben Ye <benye@amazon.com>
* fix cli docs
Signed-off-by: Ben Ye <benye@amazon.com>
---------
Signed-off-by: Ben Ye <benye@amazon.com>
2023-09-20 11:37:32 +01:00
William Dumont
ce6ad15422
remote-write: TestClientRetryAfter status code 500
...
and compare the retryAfter values.
Signed-off-by: William Dumont <william.dumont@grafana.com>
2023-09-20 10:25:43 +00:00
William Dumont
febd62a23e
remote-write: refactor TestClientRetryAfter
...
The new version features a set of test cases that simplify the addition
of new HTTP status codes.
Signed-off-by: William Dumont <william.dumont@grafana.com>
2023-09-20 10:24:52 +00:00
Bryan Boreham
9b85354acd
remote-write: respect Retry-After header on 5xx errors
...
If the server sent it to us, we should assume it knows better than we
do and respect it.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-09-20 10:14:38 +00:00
Paschalis Tsilias
c173cd57c9
Add a header to count retried remote write requests ( #12729 )
...
Header name is `Retry-Attempt`, only set when >0.
Signed-off-by: Marc Tuduri <marctc@protonmail.com>
Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
2023-09-20 11:11:03 +01:00
George Krajcsovits
7d713e1fde
Merge pull request #530 from grafana/krajo/fork-sync
...
Sync with promtheus/prometheus at 83891135c
(2023-09-19)
2023-09-20 10:09:34 +02:00
György Krajcsovits
c9e513f5a3
Merge remote-tracking branch 'upstream/main' into krajo/fork-sync
...
# Conflicts:
# storage/merge_test.go
# tsdb/chunkenc/histogram_meta.go
2023-09-19 17:53:25 +02:00
Björn Rabenstein
83891135c6
Merge pull request #12838 from krajorama/fix-disappearing-span-panic
...
Fix counterResetInAnyBucket panic
2023-09-19 17:10:27 +02:00
George Krajcsovits
3512b2d678
storage: make histogram reset handling consistent in chainSampleIterator ( #12779 )
...
storage: make histogram reset handling consistent in chainSampleIterator
---------
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-09-19 17:06:46 +02:00
Arve Knudsen
b23aa0e34c
Merge pull request #529 from grafana/chore/sync-prometheus
...
Sync with latest Prometheus upstream
2023-09-18 14:53:16 +02:00
Arve Knudsen
3989da3514
Disable GitHub Actions Dependabot updates
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-09-18 13:32:59 +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