The Prometheus monitoring system and time series database.
Find a file
Krasi Georgiev 48efdf8b81
refactor NewSegmentsRangeReader to take multi WAL ranges (#449)
* refactor NewSegmentsRangeReader to take multi WAL ranges

In case of an error when checkpointing the WAL the error doesn't show
the exact WAL index that is corrupter. this is because it uses
MultiReader to read multiply WAL files.
This refactoring allows the NewSegmentsRangeReader to take more than a
single WAL range and it reads all of the ranges by iterating each one.

this changes the logs from
create checkpoint: read segments: corruption after 4841144384 bytes:...
to
create checkpoint: read segments: corruption in segment
data/wal/00017351 at 123142208: ...

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2018-11-30 16:46:16 +02:00
chunkenc Make newBReader return a struct, not a pointer. (#459) 2018-11-22 13:21:57 +05:30
chunks Make interval overlap comparisons more explicit 2018-07-02 10:35:08 +02:00
cmd/tsdb Using filepath.Join() instead of strings with slashes (#428) 2018-10-25 10:32:57 +01:00
docs/format add missing zero to tombstone magic number (#448) 2018-11-09 13:37:02 +02:00
fileutil Add license headers to missing files (#447) 2018-11-06 20:19:42 +02:00
index Make MemPostings nested. 2018-11-22 09:36:39 +00:00
labels FromMap(), sorts and returns instead of calling New() (#433) 2018-11-14 13:43:03 +01:00
test index: simplify checksum validation 2017-11-09 15:58:36 +00:00
testdata Add repair test 2018-02-09 13:43:42 +01:00
testutil fileutil: remove dependency on prometheus/prometheus 2018-10-15 17:21:20 +02:00
tsdbutil Add license headers to missing files (#447) 2018-11-06 20:19:42 +02:00
wal refactor NewSegmentsRangeReader to take multi WAL ranges (#449) 2018-11-30 16:46:16 +02:00
.gitignore Add default benchmark output dir to .gitignore 2018-01-14 11:07:52 +00:00
.travis.yml Use Go modules (#454) 2018-11-28 11:39:56 +01:00
block.go Reduce memory taken up by posting/symbol tables. 2018-11-22 09:36:39 +00:00
block_test.go fix lint errors (#439) 2018-11-14 18:40:01 +02:00
CHANGELOG.md refactor NewSegmentsRangeReader to take multi WAL ranges (#449) 2018-11-30 16:46:16 +02:00
checkpoint.go refactor NewSegmentsRangeReader to take multi WAL ranges (#449) 2018-11-30 16:46:16 +02:00
checkpoint_test.go refactor NewSegmentsRangeReader to take multi WAL ranges (#449) 2018-11-30 16:46:16 +02:00
compact.go Use already open blocks while compacting. (#441) 2018-11-15 12:20:54 +00:00
compact_test.go fix flaky compaction test (#458) 2018-11-21 00:33:14 +02:00
db.go Reload after reading the WAL. (#460) 2018-11-28 09:23:50 +00:00
db_test.go Reload after reading the WAL. (#460) 2018-11-28 09:23:50 +00:00
encoding_helpers.go Add license headers to missing files (#447) 2018-11-06 20:19:42 +02:00
go.mod Use Go modules (#454) 2018-11-28 11:39:56 +01:00
go.sum Use Go modules (#454) 2018-11-28 11:39:56 +01:00
head.go refactor NewSegmentsRangeReader to take multi WAL ranges (#449) 2018-11-30 16:46:16 +02:00
head_bench_test.go Add license headers to missing files (#447) 2018-11-06 20:19:42 +02:00
head_test.go repair wal when the record cannot be decoded (#453) 2018-11-30 13:37:04 +02:00
LICENSE Add license file 2017-04-10 21:02:42 +02:00
MAINTAINERS.md add maintainers file (#404) 2018-10-15 14:32:00 +03:00
Makefile Refactor Makefile to use Makefile.common (#324) 2018-09-21 11:08:38 +03:00
Makefile.common Use Go modules (#454) 2018-11-28 11:39:56 +01:00
mocks_test.go fix lint errors (#439) 2018-11-14 18:40:01 +02:00
querier.go LabelNames() for Querier (#455) 2018-11-16 19:02:24 +01:00
querier_test.go fix lint errors (#439) 2018-11-14 18:40:01 +02:00
README.md comments about the 120samples const and link to Gorilla papers. (#423) 2018-10-23 13:43:06 +03:00
record.go fix lint errors (#439) 2018-11-14 18:40:01 +02:00
record_test.go Add checkpointing of WAL segments 2018-07-19 07:24:40 -04:00
repair.go Add license headers to missing files (#447) 2018-11-06 20:19:42 +02:00
repair_test.go Add license headers to missing files (#447) 2018-11-06 20:19:42 +02:00
tombstones.go fix lint errors (#439) 2018-11-14 18:40:01 +02:00
tombstones_test.go fix lint errors (#439) 2018-11-14 18:40:01 +02:00
wal.go removed some unused code and moved mockSeriesSet in querier_test (#394) 2018-09-21 11:07:35 +03:00
wal_test.go Using filepath.Join() instead of strings with slashes (#428) 2018-10-25 10:32:57 +01:00

TSDB Build Status

GoDoc Go Report Card

This repository 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.