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
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
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
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
Arve Knudsen
5fd66ba855
Merge pull request #14510 from aknuds1/arve/add-normalize-name-tests
...
otlptranslator: Add tests for BuildCompliantName
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
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
Julien
d7e4ba6cf1
Merge pull request #14566 from prometheus/dependabot/github_actions/actions/setup-go-5.0.2
...
build(deps): bump actions/setup-go from 5.0.1 to 5.0.2
4 months ago
beorn7
2360ce8d2b
docs: Be more explicit about `promql-experimental-functions`
...
We have not mentioned that experimental PromQL functions might get
removed entirely, although that's one of the most important properties
of functions declared experimental.
Signed-off-by: beorn7 <beorn@grafana.com>
4 months ago
Björn Rabenstein
41f8a0223c
Merge pull request #14609 from charleskorn/rate-over-mixed-custom-exponential-histograms
...
promql: fix "cannot reduce resolution to custom buckets schema" panic in `rate` over native histograms with mix of custom and exponential buckets
4 months ago
Manik Rana
02c465bf58
textparse: Implement `CreatedTimestamp()` in `openmetricsparse.go` ( #14356 )
...
* feat: initial implement of createedTimestamp() with tests
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* feat: return ct after finding it
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: remove unneeded test
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: add comments
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* feat: multiple changes
- implement changes from pair programming session
- use newParse.val()
- advance parser p if ct is found
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* fix: check if err from p.Next()
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* feat: advance parser and parse histograms + summary
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* fix: restore previous tests
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* fix: retore failing tests
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: remove unneeded comments
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* fix: return nil when mtype doesn't match
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: update go fmt version
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: cleanup
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* fix: comments
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* feat: document deepcopyparser
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
Signed-off-by: Manik Rana <Manikrana54@gmail.com>
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: lint
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* fix: cover edgecase of `gauge_created` in CreatedTimestamp()
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* refac: readability updates
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* refac: dedeuplicate labeldiff checks
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* tests: add tests for new label functions
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* feat: document CreatedTimestamp func
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* refac: optimize `CreatedTimestamp()`
- Use refactored CreatedTimestamp function with bug fixes
- Remove unused code in labels.go
- Improve code documentation
Signed-off-by: Manik Rana <manikrana54@gmail.com>
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: add tests and lint fixes
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: remove mName
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: lint
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: comments
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* tests: add tests for CT parse failures and deepCopy
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* refac: edit expectCT struct
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: lint
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: add new label in deepCopy
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* fix: use p.builder in deepCopy
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* fix: add NewMetricsParserWithOpts
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: lint
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: comments
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
Signed-off-by: Manik Rana <Manikrana54@gmail.com>
* chore: comments
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
Signed-off-by: Manik Rana <Manikrana54@gmail.com>
* chore: rename var
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* fix: add condition for OM fuzzing
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* fix: build tags
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* refac: default skipCT to false
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* refac: rename skipCT to skipCTSeries
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: formatting
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: comments and readability updates
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: comments
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Manik Rana <Manikrana54@gmail.com>
* refac: remove NewOpenMetricsParserWithOpts
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: lint
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* refac: extract skipCTSeries logic from parseMetricSuffix
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* refac: inline create a NewOpenMetricsParser
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: comments
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: comments
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Manik Rana <Manikrana54@gmail.com>
* refac: improve error handling
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* fix: return error instead of nil
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* fix: remove skipCT check from tBraceOpen
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* Pair programming with Manik, Arthur and Daniel.
Signed-off-by: bwplotka <bwplotka@gmail.com>
* chore: comments and use helper funcs
Signed-off-by: Manik Rana <manikrana54@gmail.com>
* chore: lint
Signed-off-by: Manik Rana <manikrana54@gmail.com>
---------
Signed-off-by: Manik Rana <manikrana54@gmail.com>
Signed-off-by: Manik Rana <Manikrana54@gmail.com>
Signed-off-by: bwplotka <bwplotka@gmail.com>
Co-authored-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
4 months ago
Ben Ye
b7a58dcf3d
Add hidden flag to disable overlapping compaction ( #14581 )
...
TSDB: add hidden flag to disable overlapping compaction
Signed-off-by: Ben Ye <benye@amazon.com>
---------
Signed-off-by: Ben Ye <benye@amazon.com>
4 months ago
Charles Korn
f91009aa2e
promql: clarify error message when panic occurs during query evaluation
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
4 months ago
Björn Rabenstein
27579c9148
Merge pull request #14605 from krajorama/fix-staleness-pool-corrupt
...
Fix histogram pool poisoning bug chunkenc.Iterator
4 months ago
George Krajcsovits
17b0b788da
Update promql/engine.go
...
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
4 months ago
Arthur Silva Sens
f74d448c69
Merge pull request #14516 from freak12techno/use-humanize-duration-from-common
...
chore: use HumanizeDuration and ConvertToFloat from prometheus/common
4 months ago
George Krajcsovits
3a673cd0bc
Merge pull request #14598 from krajorama/fix-compaction-panic
...
Fix: panic: runtime error: index out of range [4] with length 4
4 months ago
machine424
92873d3009
feat: allow to delay head compaction start time helping Prometheus instances to
...
avoid simultaneous compactions and reduce stress on shared resources.
This is enabled via `--enable-feature=delayed-compaction`.
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
4 months ago
Oleg Zaytsev
0833d2a230
Fix appendable: check whether last val was a histogram ( #14613 )
...
* Fix appendable: check whether last val was a histogram
When appending a float, we were checking whether lastValue was equal to
current value, but we didn't check whether last value was a float value.
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
4 months ago
Charles Korn
424cefcf5e
Fix "cannot reduce resolution to custom buckets schema" panic in `rate` over native histograms with mix of custom and exponential buckets
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
4 months ago
Charles Korn
f6e4b775e2
Check for errors first
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
4 months ago
György Krajcsovits
b91acc61b0
Add unit test
...
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
4 months ago
Björn Rabenstein
ee5bba07c0
Merge pull request #14413 from prometheus/beorn7/promql
...
promql: more Kahan summation (avg) and less incremental mean calculation (avg, avg_over_time)
4 months ago
Björn Rabenstein
71ba554293
Merge pull request #14482 from ywwg/owilliams/group-quote
...
promql: support quoting in grouping label lists
4 months ago