prometheus/tsdb
Oleg Zaytsev b1e4052682
MemPostings.Delete(): make pauses to unlock and let the readers read (#15242)
This introduces back some unlocking that was removed in #13286 but in a
more balanced way, as suggested by @pracucci.

For TSDBs with a lot of churn, Delete() can take a couple of seconds,
and while it's holding the mutex, reads and writes are blocked waiting
for that mutex, increasing the number of connections handled and memory
usage.

This implementation pauses every 4K labels processed (note that also
compared to #13286 we're not processing all the label-values anymore,
but only the affected ones, because of #14307), makes sure that it's
possible to get the read lock, and waits for a few milliseconds more.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Co-authored-by: Marco Pracucci <marco@pracucci.com>
2024-11-05 12:59:57 +01:00
..
agent Agent: allow for ingestion of CT samples (#15124) 2024-10-27 01:06:34 +01:00
chunkenc lint 2024-09-18 15:23:46 +01:00
chunks Fix missing histogram copy in sampleRing 2024-10-02 13:57:28 +02:00
docs docs: Some nitpicking in chunks.md 2024-10-09 14:32:12 +02:00
encoding Neater string vs byte-slice conversions (#14425) 2024-09-21 12:19:21 +02:00
errors
fileutil
goversion
index MemPostings.Delete(): make pauses to unlock and let the readers read (#15242) 2024-11-05 12:59:57 +01:00
record chore: Fix typos (#14868) 2024-09-10 22:32:03 +02:00
testdata
tombstones chore!: adopt log/slog, remove go-kit/log 2024-10-07 15:58:50 -04:00
tsdbutil chore!: adopt log/slog, remove go-kit/log 2024-10-07 15:58:50 -04:00
wlog chore!: adopt log/slog, remove go-kit/log 2024-10-07 15:58:50 -04:00
.gitignore
block.go chore!: adopt log/slog, remove go-kit/log 2024-10-07 15:58:50 -04:00
block_test.go chore!: adopt log/slog, remove go-kit/log 2024-10-07 15:58:50 -04:00
blockwriter.go chore!: adopt log/slog, remove go-kit/log 2024-10-07 15:58:50 -04:00
blockwriter_test.go chore!: adopt log/slog, remove go-kit/log 2024-10-07 15:58:50 -04:00
CHANGELOG.md
compact.go chore!: adopt log/slog, remove go-kit/log 2024-10-07 15:58:50 -04:00
compact_test.go chore!: adopt log/slog, remove go-kit/log 2024-10-07 15:58:50 -04:00
db.go Add hidden flag for the delayed compaction random time window (#14919) 2024-11-04 08:26:26 +01:00
db_test.go Add hidden flag for the delayed compaction random time window (#14919) 2024-11-04 08:26:26 +01:00
example_test.go
exemplar.go tsdb.CircularExemplarStorage: Avoid racing (#15231) 2024-10-29 10:40:46 +01:00
exemplar_test.go tsdb.CircularExemplarStorage: Avoid racing (#15231) 2024-10-29 10:40:46 +01:00
head.go Agent: allow for ingestion of CT samples (#15124) 2024-10-27 01:06:34 +01:00
head_append.go [REFACTORY] simplify appender commit (#15112) 2024-10-29 12:34:02 +00:00
head_bench_test.go Revert "Fix MemPostings.Add and MemPostings.Get data race (#15141)" 2024-11-03 12:30:34 +00:00
head_dedupelabels.go chore!: adopt log/slog, remove go-kit/log 2024-10-07 15:58:50 -04:00
head_other.go chore!: adopt log/slog, remove go-kit/log 2024-10-07 15:58:50 -04:00
head_read.go chore!: adopt log/slog, remove go-kit/log 2024-10-07 15:58:50 -04: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 Reproduce populateWithDelChunkSeriesIterator corrupting chunk meta 2024-10-18 10:34:22 +02:00
head_wal.go chore!: adopt log/slog, remove go-kit/log 2024-10-07 15:58:50 -04: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: Only query chunks up to truncation time (#14948) 2024-09-20 17:44:04 +01:00
ooo_head_read_test.go Reproduce populateWithDelChunkSeriesIterator corrupting chunk meta 2024-10-18 10:34:22 +02:00
ooo_head_test.go tsdb: Add support for ingestion of out-of-order native histogram samples (#14546) 2024-09-17 11:19:06 +02:00
ooo_isolation.go
ooo_isolation_test.go
querier.go Fix populateWithDelChunkSeriesIterator corrupting chunk meta 2024-10-18 10:34:22 +02:00
querier_bench_test.go TSDB: Simplify benchmark regexps 2024-09-16 17:48:05 +01:00
querier_test.go fix(storage/mergeQuerier): copy the matcjers slice before passing it to queriers as 2024-10-22 14:08:47 +02:00
README.md
repair.go chore!: adopt log/slog, remove go-kit/log 2024-10-07 15:58:50 -04:00
repair_test.go
testutil.go Reproduce populateWithDelChunkSeriesIterator corrupting chunk meta 2024-10-18 10:34:22 +02:00
tsdbblockutil.go chore!: adopt log/slog, remove go-kit/log 2024-10-07 15:58:50 -04:00

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: