Bryan Boreham
512c67ec26
TSDB: Never go over maximum number of OOO chunks
...
In `mmapCurrentOOOHeadChunk`, check if the number is at the maximum and
drop the data with an error log. This is not expected to happen as the
maximum is over 8 million; that's 8 years of 1 sample every second.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
Bryan Boreham
9135da1e4f
TSDB: Review feedback
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
* Re-enable check in `createHeadWithOOOSamples` which wasn't really broken.
* Move code making `Block` into a `Queryable` into test file.
* Make `getSeriesChunks` return a slice (renamed `appendSeriesChunks`).
* Rename `oooMergedChunks` to `mergedChunks`.
* Improve comment on `ChunkOrIterableWithCopy`.
* Name return values from unpackHeadChunkRef.
Co-authored-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
Bryan Boreham
7ffd3ca280
TSDB: Cosmetic: move HeadAndOOO implementations where old code was
...
This makes the diffs easier to follow.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
Bryan Boreham
e95607b276
TSDB: Lock round access to labels, where necessary
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
Bryan Boreham
26b3de0438
TSDB: Remove OOOHeadIndexReader
...
Use headIndexReader instead.
OOOCompactionHeadIndexReader needs to be expanded slightly, because it previously delegated to OOOHeadIndexReader.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
Bryan Boreham
a299c7b6d6
TSDB: Remove OOOHeadChunkReader
...
Use HeadAndOOOChunkReader instead.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
Bryan Boreham
e7e50a3afd
TSDB: Remove code for querying OOO-head only
...
Just query via `HeadAndOOOQuerier`, which will skip series where no
in-order chunks are in range.
Now we don't need `OOORangeHead`.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
Bryan Boreham
0a2ff76881
TSDB tests: Fix up BenchmarkQueries
...
Was not working even on main. Some cases still error.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
Björn Rabenstein
9849418fac
Merge pull request #14611 from charleskorn/sum-and-avg-over-mixed-custom-exponential-histograms
...
promql: fix incorrect results and panics in `sum` and `avg` over mixed custom and exponential buckets, or incompatible custom buckets
3 months ago
suntala
ce4eac859a
Link to specific feature flag entry
...
Signed-off-by: suntala <arati.rana@grafana.com>
3 months ago
Bryan Boreham
f261597944
TSDB: Fix up LabelValues to work for OOO-only head
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
Bryan Boreham
6529d6336c
TSDB: NewHeadAndOOOChunkReader takes headChunkReader
...
So we can pass nil and have it read just OOO chunks.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
Bryan Boreham
e04d137649
[PERF] TSDB: Query head and ooo-head together
...
Add `HeadAndOOOQuerier` which iterates just once over series, then
where necessary merges chunks from in-order and out-of-order lists.
Add a ChunkQuerier for in-order and ooo together
Add copy-last-chunk behaviour to HeadAndOOOChunkReader
Out-of-order chunk IDs are distinguished from in-order by setting bit 23.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
Bryan Boreham
2936ab80d7
[Tests] Promtool: Sort output where Prometheus does not guarantee the order.
...
Previously this was working because iout-of-order chunks forced a sort and merge.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
Bryan Boreham
da31da3ea6
Refactor: extract selectSeriesSet and selectChunkSeriesSet
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
Bryan Boreham
7e24844d08
Refactor: extract headChunkReader.chunkFromSeries()
...
For when you have a series locked already.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
Bryan Boreham
a32aca0cd7
Refactoring: extract getOOOSeriesChunks
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
Bryan Boreham
c75c8f8329
Refactoring: extract getSeriesChunks
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
Bryan Boreham
0c852680bf
[Benchmark] TSDB: Add BenchmarkQuerierSelectWithOutOfOrder
...
Refactor existing BenchmarkQuerierSelect to provide the set-up.
Note that Head queries now run faster because they use a RangeHead.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
3 months ago
George Krajcsovits
ff0a1e5e11
Merge pull request #14671 from krajorama/prep-ooo-native-histograms
...
tsdb: prepare inserting native histograms into OOO head
3 months ago
György Krajcsovits
41656162fc
tsdb: prepare inserting native histograms into OOO head
...
Rename a variable.
Add parameters to memSeries.insert function.
No effect on how float samples are handled.
Related to #14546
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
3 months ago
Charles Korn
52818a97e2
Merge branch 'main' into sum-and-avg-over-mixed-custom-exponential-histograms
...
# Conflicts:
# promql/promqltest/testdata/native_histograms.test
3 months ago
Björn Rabenstein
c2bc6cfe97
Merge pull request #14621 from charleskorn/panic-message
...
promql: clarify error message logged when panic occurs during query evaluation
3 months ago
George Krajcsovits
fe5354df88
Merge pull request #14658 from krajorama/zero-rate-nh-quantile
...
Native histograms: define behavior when rate is null.
3 months ago
György Krajcsovits
386fc8b9f6
Update from review comments.
...
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
3 months ago
Bryan Boreham
aa4b056ad0
Merge pull request #13200 from bboreham/wlog-defer
...
tsdb/wlog: close segment files sooner
3 months ago
Arve Knudsen
6f1fd4be96
Merge pull request #14663 from aknuds1/arve/promql-comment
...
PromQL engine: Fix comment regarding non-nil histogram pointer
3 months ago
Arve Knudsen
0503d4f372
PromQL: Fix comment regarding non-nil histogram pointer
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
3 months ago
Lukasz Mierzwa
7694c89497
Increase TestHangingNotifier timeout
...
This test keeps timing out on our arm64 CI server, it does use a very slow timeout and that 5ms doesn't seem to be enough.
But it 10x.
Signed-off-by: Lukasz Mierzwa <lukasz@cloudflare.com>
3 months ago
György Krajcsovits
6aee5b4b38
fix typo
...
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
3 months ago
György Krajcsovits
06a8886b94
Native histograms: define behavior when rate is null.
...
Histogram quantile returns NaN in this case, which might be
surprising, so add a unit test that clarifies that this is
intentional.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
3 months ago
suntala
532904a1d6
Document changes to sort by label
...
Co-authored-by: Aleks Fazlieva <britishrum@users.noreply.github.com>
Signed-off-by: suntala <arati.rana@grafana.com>
3 months ago
suntala
fd2f44af7f
Fall back to comparing by label set when sorting by label desc
...
Co-authored-by: Aleks Fazlieva <britishrum@users.noreply.github.com>
Signed-off-by: suntala <arati.rana@grafana.com>
3 months ago
suntala
94ad489328
Fall back to comparing by label set when sorting by label
...
Co-authored-by: Aleks Fazlieva <britishrum@users.noreply.github.com>
Signed-off-by: suntala <arati.rana@grafana.com>
3 months ago
Arve Knudsen
5fd66ba855
Merge pull request #14510 from aknuds1/arve/add-normalize-name-tests
...
otlptranslator: Add tests for BuildCompliantName
4 months ago
machine424
82f38d3e9a
fix(tsdb/db_test.go): close the corrupted chunk after creating it to satisfy Windows FS
...
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
4 months ago
Bryan Boreham
5354e87a70
Merge pull request #14644 from prometheus/prep-2.54.0
...
Cut release 2.54.0
4 months ago
Bryan Boreham
8978f3ef71
Cut release 2.54.0
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
4 months ago
Julien
616038f2b6
Merge pull request #14553 from prometheus/dependabot/go_modules/github.com/aws/aws-sdk-go-1.55.5
...
build(deps): bump github.com/aws/aws-sdk-go from 1.54.19 to 1.55.5
4 months ago
Julien
7b0f6f1aed
Merge pull request #14573 from prometheus/dependabot/github_actions/scripts/actions/setup-go-5.0.2
...
build(deps): bump actions/setup-go from 5.0.1 to 5.0.2 in /scripts
4 months ago
Julien
c210917b91
Merge pull request #14571 from prometheus/dependabot/github_actions/actions/upload-artifact-4.3.4
...
build(deps): bump actions/upload-artifact from 4.3.3 to 4.3.4
4 months ago
Julien
4387de8189
Merge pull request #14568 from prometheus/dependabot/github_actions/bufbuild/buf-setup-action-1.35.1
...
build(deps): bump bufbuild/buf-setup-action from 1.34.0 to 1.35.1
4 months ago
Charles Korn
f992f81bd0
Merge branch 'main' into sum-and-avg-over-mixed-custom-exponential-histograms
...
Signed-off-by: Charles Korn <charleskorn@users.noreply.github.com>
4 months ago
Charles Korn
5cfdde327c
Address PR feedback: add extra test case
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
4 months ago
Charles Korn
82bb35fabb
Address PR feedback: fix typo and rename variable
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
4 months ago
George Krajcsovits
cf62fb5c44
Merge pull request #14629 from krajorama/fix-to-encoded-chunks
...
Fix ToEncodedChunks minT for recoded chunks
4 months ago
György Krajcsovits
1ea3781699
Fix ToEncodedChunks minT for recoded chunks
...
Discovered while working on #14546 OOO native histograms.
Not triggered on main before #14546 as the code path is unused.
There was a bug where the min time of a chunk was adjusted even
if it was only recoded and not completely new.
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
4 months ago
Björn Rabenstein
b5cdb4e479
Merge pull request #14628 from prometheus/beorn7/doc
...
docs: Be more explicit about `promql-experimental-functions`
4 months ago
Julien
5857888926
Merge pull request #14570 from prometheus/dependabot/github_actions/golangci/golangci-lint-action-6.1.0
...
build(deps): bump golangci/golangci-lint-action from 6.0.1 to 6.1.0
4 months ago
Julien
339889f60f
Merge pull request #14567 from prometheus/dependabot/github_actions/ossf/scorecard-action-2.4.0
...
build(deps): bump ossf/scorecard-action from 2.3.3 to 2.4.0
4 months ago