Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
Release 0.6.0 (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
krasi-georgiev authored Mar 2, 2019
1 parent e78fedf commit ab8476d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
16 changes: 8 additions & 8 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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")
}
Expand Down
2 changes: 1 addition & 1 deletion db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit ab8476d

Please sign in to comment.