prometheus/tsdb
Bryan Boreham 9a74d53935
[BUGFIX] TSDB: Fix query overlapping in-order and ooo head (#14693)
* tsdb: Unit test query overlapping in order and ooo head

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>

* TSDB: Merge overlapping head chunk

The basic idea is that getOOOSeriesChunks can populate Meta.Chunk, but since
it only returns one Meta per overlapping time-slot, that pointer may end up in a
Meta with a head-chunk ID. So we need HeadAndOOOChunkReader.ChunkOrIterable()
to call mergedChunks in that case.

Previously, mergedChunks was checking that meta.Ref was a valid OOO chunk reference,
but it never actually uses that reference; it just finds all chunks overlapping in time.
So we can delete that code.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

Co-authored-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2024-08-21 14:24:20 +01:00
..
agent [PRW 2.0] Merging `remote-write-2.0` feature branch to main (PRW 2.0 support + metadata in WAL) (#14395) 2024-07-04 14:29:20 -07:00
chunkenc Fix corrupting spans via iterator sharing 2024-08-06 16:51:20 +02:00
chunks Upgrade golangci-lint to v1.60.1 2024-08-18 12:13:25 +02:00
docs Fix language in docs and comments (#14041) 2024-05-08 17:57:09 +02:00
encoding
errors
fileutil tests: remove err from message when testify prints it already 2024-02-01 14:18:01 +00:00
goversion
index Upgrade golangci-lint to v1.60.1 2024-08-18 12:13:25 +02:00
record Fix a couple of comments 2024-07-05 15:25:42 +02:00
testdata
tombstones
tsdbutil Ignore stale histograms for counter reset detection 2024-07-26 10:08:31 +02:00
wlog Upgrade golangci-lint to v1.60.1 2024-08-18 12:13:25 +02:00
.gitignore
CHANGELOG.md
README.md
block.go TSDB: Review feedback 2024-08-14 13:41:44 +01:00
block_test.go tsdb: Extend compactor interface to allow compactions to create multiple output blocks (#14143) 2024-06-12 17:31:25 -04:00
blockwriter.go tsdb: Extend compactor interface to allow compactions to create multiple output blocks (#14143) 2024-06-12 17:31:25 -04:00
blockwriter_test.go
compact.go TSDB: Change block populator to accept postings index function (#14213) 2024-06-25 09:21:48 +01:00
compact_test.go feat: allow to delay head compaction start time helping Prometheus instances to 2024-08-07 17:10:27 +02:00
db.go Upgrade golangci-lint to v1.60.1 2024-08-18 12:13:25 +02:00
db_test.go [BUGFIX] TSDB: Fix query overlapping in-order and ooo head (#14693) 2024-08-21 14:24:20 +01:00
example_test.go
exemplar.go [ENHANCEMENT] TSDB: Save map lookup on validation 2024-05-30 09:17:11 +01:00
exemplar_test.go [Test] TSDB: BenchmarkResizeExemplar multiple per series 2024-05-30 09:17:11 +01:00
head.go Revert the option regardless of error 2024-07-30 11:31:31 +02:00
head_append.go Upgrade golangci-lint to v1.60.1 2024-08-18 12:13:25 +02:00
head_bench_test.go
head_dedupelabels.go tsdb: reset symbol table for exemplars periodically 2024-07-05 10:19:07 +01:00
head_other.go TSDB: rebuild labels symbol-table on each compaction 2024-07-05 10:19:07 +01:00
head_read.go [BUGFIX] TSDB: Fix query overlapping in-order and ooo head (#14693) 2024-08-21 14:24:20 +01:00
head_read_test.go TSDB: Simplify OOO Select by copying the head chunk (#14396) 2024-07-03 15:08:07 +01:00
head_test.go Upgrade golangci-lint to v1.60.1 2024-08-18 12:13:25 +02:00
head_wal.go TSDB: Never go over maximum number of OOO chunks 2024-08-14 13:41:59 +01:00
isolation.go
isolation_test.go
mocks_test.go
ooo_head.go TSDB: Remove code for querying OOO-head only 2024-08-14 13:41:13 +01:00
ooo_head_read.go [BUGFIX] TSDB: Fix query overlapping in-order and ooo head (#14693) 2024-08-21 14:24:20 +01:00
ooo_head_read_test.go TSDB: Remove OOOHeadIndexReader 2024-08-14 13:41:13 +01:00
ooo_head_test.go Fix ToEncodedChunks minT for recoded chunks 2024-08-08 15:22:46 +02:00
ooo_isolation.go
ooo_isolation_test.go
querier.go [PERF] TSDB: Query head and ooo-head together 2024-08-14 11:19:02 +01:00
querier_bench_test.go TSDB: Review feedback 2024-08-14 13:41:44 +01:00
querier_test.go TSDB tests: Fix up BenchmarkQueries 2024-08-14 13:41:04 +01:00
repair.go
repair_test.go tsdb tests: use go-cmp instead of DeepEquals 2024-02-08 19:32:33 +00:00
testutil.go Testutil refactoring 2024-07-03 09:28:38 -07:00
tsdbblockutil.go Optimize histogram iterators (#13340) 2024-01-23 17:02:14 +01:00

README.md

TSDB

GoPkg

This directory contains the Prometheus TSDB (Time Series DataBase) library, which handles storage and querying of all Prometheus v2 data.

Documentation

External resources

A series of blog posts explaining different components of TSDB: