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
Matthieu MOREL
67dcca5005
ci(lint): enable errorlint linter on cmd
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-09-28 08:21:01 +00:00
Linas Medziunas
3c047a3518
Expand docs comments
...
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-09-28 09:08:09 +03:00
Linas Medziunas
dfb6292600
Compare FloatHistogram.[Zero]Count float values as binary
...
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-09-28 09:06:54 +03: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
Björn Rabenstein
0de7f39e6a
Merge pull request #12894 from linasm/linasm/test-case-for-ValidateHistogram
...
Additional test case for ValidateHistogram
2023-09-27 14:16:57 +02:00
Linas Medziunas
1aad4004c3
Additional test case for ValidateHistogram
...
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-09-27 09:34:43 +03:00
Julien Pivotto
a3f424641a
Merge pull request #6724 from peergynt/template_reference
...
Added externalURL and pathPrefix functions to Template reference docs
2023-09-26 13:50:33 +02:00
Julien Pivotto
a8cdb7eb6c
Merge branch 'main' into template_reference
...
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-09-26 13:49:58 +02:00
Bryan Boreham
6dcbd653e9
tsdb: register metrics after Head is initialized ( #12876 )
...
This avoids situations where metrics are scraped before the data they
are trying to look at is initialized.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-09-25 21:57:08 +01:00
Alan Protasio
a15e884e7a
Prevent Prometheus from overallocating memory on subquery with large amount of steps. ( #12734 )
...
* change initial points slice size
Signed-off-by: Alan Protasio <alanprot@gmail.com>
* refactor on the steps calculation and moving the getXPoint/putXPoint method to the evaluator
Signed-off-by: Alan Protasio <alanprot@gmail.com>
* prevent potential panic
Signed-off-by: Alan Protasio <alanprot@gmail.com>
* Update promql/engine.go
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Alan Protasio <alanprot@gmail.com>
* Update promql/engine.go
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Alan Protasio <alanprot@gmail.com>
* Update promql/engine.go
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Alan Protasio <alanprot@gmail.com>
* Update promql/engine.go
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Alan Protasio <alanprot@gmail.com>
* Allocating slice with maximum size of 5k
Signed-off-by: Alan Protasio <alanprot@gmail.com>
* adding comments
Signed-off-by: Alan Protasio <alanprot@gmail.com>
---------
Signed-off-by: Alan Protasio <alanprot@gmail.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
2023-09-25 20:15:41 +01:00
Linas Medziunas
cbd01fc296
Fix NaN sum check in [Float]Histogram.Equals method
...
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-09-25 16:03:55 +03:00
ouyang1204
5d233df7ef
Fix rule check broken ( #12715 )
...
Signed-off-by: DrAuYueng <ouyang1204@gmail.com>
2023-09-25 17:48:05 +10:00
Goutham Veeramachaneni
86729d4d7b
Update exp package ( #12650 )
2023-09-21 22:53:51 +02:00
Björn Rabenstein
f8dd8770ac
Merge pull request #12757 from bboreham/reuse-bufiter
...
TSDB: re-use iterator when moving between series
2023-09-21 14:08:53 +02:00
Björn Rabenstein
ade2ee3fe4
Merge pull request #12716 from bboreham/simplify-seek
...
storage: simplify Seek on BufferedSeriesIterator
2023-09-21 13:56:29 +02:00
Dimitar Dimitrov
1155d736b6
Improve sensitivity of TestQuerierIndexQueriesRace
...
Currently, the two goroutines race against each other and it's possible that the main test goroutine finishes way earlier than appendSeries has had a chance to run at all.
I tested this change by breaking the code that X fixed and running the race test 100 times. Without the additional time.Sleep the test failed 11 times. With the sleep it failed 65 out of the 100 runs. Which is still not ideal, but it's a step forward.
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
2023-09-21 12:30:08 +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