mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-15 01:54:06 -08:00
cc9ddf50c9
* write chunks via queue, predicting chunkrefs * fixes * linter * cleanup * better test coverage * deduplicate operations when cutting file * better comments * fix race * improvements based on PR feedback * comments * concurrent correctness test of write queue * linter * use isStarted flag in chunk write queue * separate mutex for isStarted * fixing tests * fix race in test * PR feedback * add license headers * PR feedback * pr feedback * dont recreate workerCtrl channel * address PR feedback in high concurrency read and write test * refactor the high concurrency write queue test * pr feedback * use require.Eventually * typo * Fixing comment Co-authored-by: Peter Štibraný <peter.stibrany@grafana.com> * use buffered chan for chunk write queue * fix races * address feedback on PR * better comment * less type casts * dont reeimplement varint * move mtx above property it protects * improve tests by using wg instead of inspecting queue * add comment * add comment * writeChunkF comment * rename isStarted -> isRunning * prevent panic when double stopping * fix variable name in comment * delete outdated comment * naming and comment fixes in TestChunkWriteQueue_WrappingAroundSizeLimit * use require.False instead of require.Equal(t, false * always enable chunk write queue * dont call callback with lock held * undo rename of curFileSequence to curFileSeq * fix accidental change * fix comment * Better syntax Co-authored-by: Peter Štibraný <peter.stibrany@grafana.com> * Better wording in comment Co-authored-by: Peter Štibraný <peter.stibrany@grafana.com> * better comments to explain the use of coordinator chans in test * fix test which broke to the async writing of chunks * undo previous renaming of shadowing variable * rename var threadID to workerID * rename variables based on PR feedback * rename pos -> ts * better implementation of whileNotCanceled * update querySeriesRef before using it * rename labels -> lbls * initialize the chunk write queue operations metric with all possible labels * dont return error from CutNewFile * recreate chunk ref map regularly to free * limit how often we recreate the chunk ref map * fix typo in comment * better comment Co-authored-by: Peter Štibraný <peter.stibrany@grafana.com> |
||
---|---|---|
.. | ||
agent | ||
chunkenc | ||
chunks | ||
docs | ||
encoding | ||
errors | ||
fileutil | ||
goversion | ||
hashcache | ||
index | ||
record | ||
test | ||
testdata | ||
tombstones | ||
tsdbutil | ||
wal | ||
.gitignore | ||
async_block_writer.go | ||
block.go | ||
block_test.go | ||
blockwriter.go | ||
blockwriter_test.go | ||
CHANGELOG.md | ||
compact.go | ||
compact_test.go | ||
db.go | ||
db_test.go | ||
example_test.go | ||
exemplar.go | ||
exemplar_test.go | ||
head.go | ||
head_append.go | ||
head_append_test.go | ||
head_bench_test.go | ||
head_read.go | ||
head_test.go | ||
head_wal.go | ||
isolation.go | ||
isolation_test.go | ||
mocks_test.go | ||
postings_for_matchers_cache.go | ||
postings_for_matchers_cache_test.go | ||
querier.go | ||
querier_bench_test.go | ||
querier_test.go | ||
README.md | ||
repair.go | ||
repair_test.go | ||
symbols_batch.go | ||
symbols_batch_test.go | ||
tsdbblockutil.go | ||
wal.go | ||
wal_test.go |
TSDB
This directory contains the Prometheus TSDB (Time Series DataBase) library, which handles storage and querying of all Prometheus v2 data.
Due to an issue with versioning, the "latest" docs shown on Godoc are outdated. Instead you may use the docs for v2.31.1
Documentation
External resources
- A writeup of the original design can be found here.
- Video: Storing 16 Bytes at Scale from PromCon 2017.
- Compression is based on the Gorilla TSDB white paper.
A series of blog posts explaining different components of TSDB: