prometheus/tsdb
Bryan Boreham d614ae9ecf
[RFC] Add method to get reference number for TSDB Appender (#8600)
* Add method to get reference number for TSDB Appender

In situations where we need to copy labels before calling Add(),
GetRef() allows to check first, then call AddFast() in the case that the series
is already known.

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

* Add explicit interface for GetRef() method

Suggested in code review by @bwplotka

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

* Rename OptionalGetRef to GetRef

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

* Simplify return value of GetRef()

0 can be relied on to mean 'no reference'

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2021-03-19 19:28:55 +00:00
..
chunkenc
chunks Fixed TestChunkDiskMapper_WriteChunk_Chunk_IterateChunks for go1.16 (#8538) 2021-02-25 14:38:12 +05:30
docs/format
encoding
errors
fileutil
goversion
index Add matchers to LabelValues() call (#8400) 2021-02-09 23:08:35 +05:30
record
test
testdata
tombstones
tsdbutil
wal Compress records before checking segment size (#8501) 2021-02-17 18:45:49 +05:30
.gitignore
block.go Rolling tombstones clean up (#8007) 2021-02-17 11:02:43 +05:30
block_test.go Combine Appender.Add and AddFast into a single Append method. (#8489) 2021-02-18 17:37:00 +05:30
blockwriter.go Combine NewHead() args into a HeadOptions struct (#8452) 2021-02-09 19:42:48 +05:30
blockwriter_test.go Combine Appender.Add and AddFast into a single Append method. (#8489) 2021-02-18 17:37:00 +05:30
CHANGELOG.md Rename default branch to main 2021-02-22 20:28:02 +01:00
compact.go Increase the buckets for compaction duration (#8342) 2021-01-25 18:12:18 +00:00
compact_test.go Combine Appender.Add and AddFast into a single Append method. (#8489) 2021-02-18 17:37:00 +05:30
db.go [RFC] Add method to get reference number for TSDB Appender (#8600) 2021-03-19 19:28:55 +00:00
db_test.go Fix DB tests in the default branch 2021-02-18 23:56:27 +01:00
exemplar.go Add circular in-memory exemplars storage (#6635) 2021-03-16 15:17:45 +05:30
exemplar_test.go Add circular in-memory exemplars storage (#6635) 2021-03-16 15:17:45 +05:30
head.go [RFC] Add method to get reference number for TSDB Appender (#8600) 2021-03-19 19:28:55 +00:00
head_bench_test.go TSDB: optimize series creation on PreCreation() failure (#8620) 2021-03-18 20:53:50 +05:30
head_test.go Add circular in-memory exemplars storage (#6635) 2021-03-16 15:17:45 +05:30
isolation.go
isolation_test.go
mocks_test.go
querier.go Add matchers to LabelValues() call (#8400) 2021-02-09 23:08:35 +05:30
querier_bench_test.go Combine Appender.Add and AddFast into a single Append method. (#8489) 2021-02-18 17:37:00 +05:30
querier_test.go Combine Appender.Add and AddFast into a single Append method. (#8489) 2021-02-18 17:37:00 +05:30
README.md
repair.go
repair_test.go
tsdbblockutil.go Combine Appender.Add and AddFast into a single Append method. (#8489) 2021-02-18 17:37:00 +05:30
wal.go Update golangci-lint to 1.36.0 2021-02-04 08:53:33 -06:00
wal_test.go

TSDB

GoDoc

This directory contains the Prometheus storage layer that is used in its 2.x releases.

A writeup of its design can be found here.

Based on the Gorilla TSDB white papers.

Video: Storing 16 Bytes at Scale from PromCon 2017.

See also the format documentation.

A series of blog posts explaining different components of TSDB: