prometheus/tsdb
Bartlomiej Plotka 2fe1e9fa93
Create a checkpoint only at the end of Compact call (#8067)
* Create a checkpoint only at the end of Compact call

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Fix review comments

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Fix Bartek's offline reviews

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Introduce TruncateInMemory and TruncateWAL

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Small enhancements and test fixing attempts

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Fix tests

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Add TestOneCheckpointPerCompactCall

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Don't truncate WAL on block compaction

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Simplified the algo.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* Better protection around calling truncateWAL, truncate WAL on Head compaction error

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

Co-authored-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2020-10-19 20:57:08 +05:30
..
chunkenc Cleanup bstream_test.go based on post-merge feedback received on #7390 (#7413) 2020-06-18 14:49:39 +05:30
chunks fix few typo (#8023) 2020-10-07 16:51:31 +01:00
docs/format Consistent naming and better names for fields in TSDB format docs (#8077) 2020-10-19 14:27:19 +05:30
encoding Avoid WriteAt for Postings. 2019-12-16 15:30:49 +00:00
errors Moving tsdb into its own subdirectory 2019-08-13 13:58:49 +05:30
fileutil More info in mmap error message (#8058) 2020-10-15 12:58:13 +05:30
goversion tsdb: test for leaks (#7566) 2020-07-21 10:08:06 +02:00
index tsdb: remove duplicate values set to reduce memory usage(map overhead) (#7915) 2020-09-10 20:35:47 +05:30
record Gracefully handle unknown WAL record types. (#8004) 2020-10-05 10:09:59 +01:00
test labels: Reduce allocated memory and latency of Hash method; Added tests. (#8025) 2020-10-15 11:31:28 +01:00
testdata tsdb: Delete blocks atomically; Remove tmp blocks on start; Added test. (#7772) 2020-08-11 06:56:08 +01:00
tombstones Encode and Decode method for tombstones (#7967) 2020-09-30 10:25:09 +05:30
tsdbutil tsdb: Added ChunkQueryable implementations to db; unified MergeSeriesSets and vertical to single struct. (#7069) 2020-07-31 16:03:02 +01:00
wal Gracefully handle unknown WAL record types. (#8004) 2020-10-05 10:09:59 +01:00
.gitignore Moving tsdb into its own subdirectory 2019-08-13 13:58:49 +05:30
block.go Create a checkpoint only at the end of Compact call (#8067) 2020-10-19 20:57:08 +05:30
block_test.go Add a tsdb writer interface (#7950) 2020-10-12 17:04:20 +01:00
blockwriter.go Add a tsdb writer interface (#7950) 2020-10-12 17:04:20 +01:00
blockwriter_test.go Add a tsdb writer interface (#7950) 2020-10-12 17:04:20 +01:00
CHANGELOG.md Spelling (#6517) 2020-01-02 15:54:09 +01:00
compact.go log on empty head compaction result (#8037) 2020-10-14 18:59:59 +05:30
compact_test.go Create a checkpoint only at the end of Compact call (#8067) 2020-10-19 20:57:08 +05:30
db.go Create a checkpoint only at the end of Compact call (#8067) 2020-10-19 20:57:08 +05:30
db_test.go Create a checkpoint only at the end of Compact call (#8067) 2020-10-19 20:57:08 +05:30
head.go Create a checkpoint only at the end of Compact call (#8067) 2020-10-19 20:57:08 +05:30
head_bench_test.go Replace sync/atomic with uber-go/atomic (#7683) 2020-07-30 13:15:42 +05:30
head_test.go Create a checkpoint only at the end of Compact call (#8067) 2020-10-19 20:57:08 +05:30
isolation.go Optimise lowWatermark in Isolation (#7332) 2020-06-03 20:09:05 +02:00
isolation_test.go Optimise lowWatermark in Isolation (#7332) 2020-06-03 20:09:05 +02:00
mocks_test.go Promtool tsdb list now prints block sizes (#7993) 2020-10-12 23:15:40 +02:00
querier.go Implement series API query hint to not hit chunks (#8050) 2020-10-14 14:36:17 +05:30
querier_bench_test.go Fix failing tests 2020-07-30 17:06:56 +05:30
querier_test.go tsdb: remove duplicate values set to reduce memory usage(map overhead) (#7915) 2020-09-10 20:35:47 +05:30
README.md Add links to TSDB blog post series in tsdb/README.md (#8078) 2020-10-19 17:17:10 +05:30
repair.go tsdb: Delete blocks atomically; Remove tmp blocks on start; Added test. (#7772) 2020-08-11 06:56:08 +01:00
repair_test.go tsdb: Delete blocks atomically; Remove tmp blocks on start; Added test. (#7772) 2020-08-11 06:56:08 +01:00
tsdbblockutil.go Add a tsdb writer interface (#7950) 2020-10-12 17:04:20 +01:00
wal.go Capitalizing first letter of all log lines (#7043) 2020-04-11 09:22:18 +01:00
wal_test.go tsdb: test for leaks (#7566) 2020-07-21 10:08:06 +02:00

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: