Release 0.6.0 (#537)

This commit is contained in:
Krasi Georgiev 2019-03-02 15:54:49 +02:00 committed by GitHub
parent e78fedf054
commit ab8476dd06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 9 deletions

View File

@ -1,5 +1,8 @@
## master / unreleased
## 0.6.0
- [CHANGE] `AllowOverlappingBlock` is now `AllowOverlappingBlocks`.
## 0.5.0
- [FEATURE] Time-ovelapping blocks are now allowed. [#370](https://github.com/prometheus/tsdb/pull/370)
- Disabled by default and can be enabled via `AllowOverlappingBlock` option.

16
db.go
View File

@ -45,11 +45,11 @@ import (
// DefaultOptions used for the DB. They are sane for setups using
// millisecond precision timestamps.
var DefaultOptions = &Options{
WALSegmentSize: wal.DefaultSegmentSize,
RetentionDuration: 15 * 24 * 60 * 60 * 1000, // 15 days in milliseconds
BlockRanges: ExponentialBlockRanges(int64(2*time.Hour)/1e6, 3, 5),
NoLockfile: false,
AllowOverlappingBlock: false,
WALSegmentSize: wal.DefaultSegmentSize,
RetentionDuration: 15 * 24 * 60 * 60 * 1000, // 15 days in milliseconds
BlockRanges: ExponentialBlockRanges(int64(2*time.Hour)/1e6, 3, 5),
NoLockfile: false,
AllowOverlappingBlocks: false,
}
// Options of the DB storage.
@ -73,9 +73,9 @@ type Options struct {
// NoLockfile disables creation and consideration of a lock file.
NoLockfile bool
// Overlapping blocks are allowed iff AllowOverlappingBlock is true.
// Overlapping blocks are allowed if AllowOverlappingBlocks is true.
// This in-turn enables vertical compaction and vertical query merge.
AllowOverlappingBlock bool
AllowOverlappingBlocks bool
}
// Appender allows appending a batch of data. It must be completed with a
@ -553,7 +553,7 @@ func (db *DB) reload() (err error) {
sort.Slice(loadable, func(i, j int) bool {
return loadable[i].Meta().MinTime < loadable[j].Meta().MinTime
})
if !db.opts.AllowOverlappingBlock {
if !db.opts.AllowOverlappingBlocks {
if err := validateBlockSequence(loadable); err != nil {
return errors.Wrap(err, "invalid block sequence")
}

View File

@ -1933,7 +1933,7 @@ func TestVerticalCompaction(t *testing.T) {
createBlock(t, tmpdir, series)
}
opts := *DefaultOptions
opts.AllowOverlappingBlock = true
opts.AllowOverlappingBlocks = true
db, err := Open(tmpdir, nil, nil, &opts)
testutil.Ok(t, err)
defer func() {