- [ENHANCEMENT] Time-ovelapping blocks are now allowed. #370
- Added
MergeChunks
function inchunkenc/xor.go
to merge 2 time-overlapping chunks. - Added
MergeOverlappingChunks
function inchunks/chunks.go
to merge multiple time-overlapping Chunk Metas. - Added
MinTime
andMaxTime
method forBlockReader
.
- Added
- [CHANGE]
NewLeveledCompactor
takes a context so that a compaction is canceled when closing the db. - [ENHANCEMENT] When closing the db any running compaction will be cancelled so it doesn't block.
- [CHANGE]
prometheus_tsdb_storage_blocks_bytes_total
is nowprometheus_tsdb_storage_blocks_bytes
- [CHANGE] New
WALSegmentSize
option to override theDefaultOptions.WALSegmentSize
. Added to allow using smaller wal files. For example using tmpfs on a RPI to minimise the SD card wear out from the constant WAL writes. As part of this change theDefaultOptions.WALSegmentSize
constant was also exposed. - [CHANGE] Empty blocks are not written during compaction #374
- [FEATURE] Size base retention through
Options.MaxBytes
. As part of this change:- Added new metrics -
prometheus_tsdb_storage_blocks_bytes_total
,prometheus_tsdb_size_retentions_total
,prometheus_tsdb_time_retentions_total
- New public interface
SizeReader: Size() int64
OpenBlock
signature changed to take a logger.
- Added new metrics -
- [REMOVED]
PrefixMatcher
is considered unused so was removed. - [CLEANUP]
Options.WALFlushInterval
is removed as it wasn't used anywhere. - [FEATURE] Add new
LiveReader
to WAL pacakge. Added to allow live tailing of a WAL segment, used by Prometheus Remote Write after refactor. The main difference between the new reader and the existingReader
is that forLiveReader
a call toNext()
that returns false does not mean that there will never be more data to read.
- [BUGFIX] Fixed most windows test and some actual bugs for unclosed file readers.
- [CHANGE]
LastCheckpoint()
used to return just the segment name and now it returns the full relative path. - [CHANGE]
NewSegmentsRangeReader()
can now read over miltiple wal ranges by using the newSegmentRange{}
struct. - [CHANGE]
CorruptionErr{}
now also exposes the SegmentDir
which is added when displaying any errors. - [CHANGE]
Head.Init()
is changed toHead.Init(minValidTime int64)
- [CHANGE]
SymbolTable()
renamed toSymbolTableSize()
to make the name consistent with theBlock{ symbolTableSize uint64 }
field. - [CHANGE]
wal.Reader{}
now exposesSegment()
for the current segment being read andOffset()
for the current offset. - [FEATURE] tsdbutil analyze subcomand to find churn, high cardinality, etc.