Merge pull request #3951 from prometheus/tsdbup3

vendor: update prometheus/tsdb
pull/3959/head
Fabian Reinartz 7 years ago committed by GitHub
commit fcb8e9ac95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -151,16 +151,11 @@ func (c *LeveledCompactor) Plan(dir string) ([]string, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
// We do not include the most recently created block. This gives users a window
// of a full block size to piece-wise backup new data without having to care
// about data overlap.
if len(dirs) < 1 { if len(dirs) < 1 {
return nil, nil return nil, nil
} }
dirs = dirs[:len(dirs)-1]
var dms []dirMeta var dms []dirMeta
for _, dir := range dirs { for _, dir := range dirs {
meta, err := readMetaFile(dir) meta, err := readMetaFile(dir)
if err != nil { if err != nil {
@ -176,6 +171,10 @@ func (c *LeveledCompactor) plan(dms []dirMeta) ([]string, error) {
return dms[i].meta.MinTime < dms[j].meta.MinTime return dms[i].meta.MinTime < dms[j].meta.MinTime
}) })
// We do not include a recently created block with max(minTime), so the block which was just created from WAL.
// This gives users a window of a full block size to piece-wise backup new data without having to care about data overlap.
dms = dms[:len(dms)-1]
var res []string var res []string
for _, dm := range c.selectDirs(dms) { for _, dm := range c.selectDirs(dms) {
res = append(res, dm.dir) res = append(res, dm.dir)

@ -653,6 +653,11 @@ func newReader(b ByteSlice, c io.Closer) (*Reader, error) {
return r, nil return r, nil
} }
// Version returns the file format version of the underlying index.
func (r *Reader) Version() int {
return r.version
}
// Range marks a byte range. // Range marks a byte range.
type Range struct { type Range struct {
Start, End int64 Start, End int64

28
vendor/vendor.json vendored

@ -800,40 +800,40 @@
"revisionTime": "2016-04-11T19:08:41Z" "revisionTime": "2016-04-11T19:08:41Z"
}, },
{ {
"checksumSHA1": "zVgXlbZ1J8GhBN7tZji7M/SuiAU=", "checksumSHA1": "JfxP001vgt0P+hEDk/if0bxa8xU=",
"path": "github.com/prometheus/tsdb", "path": "github.com/prometheus/tsdb",
"revision": "16b2bf1b45ce3e3536c78ebec5116ea09a69786e", "revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
"revisionTime": "2018-03-02T11:51:49Z" "revisionTime": "2018-03-13T20:20:03Z"
}, },
{ {
"checksumSHA1": "S7F4yWxVLhxQNHMdgoOo6plmOOs=", "checksumSHA1": "S7F4yWxVLhxQNHMdgoOo6plmOOs=",
"path": "github.com/prometheus/tsdb/chunkenc", "path": "github.com/prometheus/tsdb/chunkenc",
"revision": "494acd307058387ced7646f9996b0f7372eaa558", "revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
"revisionTime": "2018-02-15T11:29:47Z" "revisionTime": "2018-03-13T20:20:03Z"
}, },
{ {
"checksumSHA1": "+zsn1i8cqwgZXL8Bg6jDy32xjAo=", "checksumSHA1": "+zsn1i8cqwgZXL8Bg6jDy32xjAo=",
"path": "github.com/prometheus/tsdb/chunks", "path": "github.com/prometheus/tsdb/chunks",
"revision": "494acd307058387ced7646f9996b0f7372eaa558", "revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
"revisionTime": "2018-02-15T11:29:47Z" "revisionTime": "2018-03-13T20:20:03Z"
}, },
{ {
"checksumSHA1": "h49AAcJ5+iRBwCgbfQf+2T1E1ZE=", "checksumSHA1": "h49AAcJ5+iRBwCgbfQf+2T1E1ZE=",
"path": "github.com/prometheus/tsdb/fileutil", "path": "github.com/prometheus/tsdb/fileutil",
"revision": "494acd307058387ced7646f9996b0f7372eaa558", "revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
"revisionTime": "2018-02-15T11:29:47Z" "revisionTime": "2018-03-13T20:20:03Z"
}, },
{ {
"checksumSHA1": "UlvN+ZhTu52S8f9niySQpPC+dvQ=", "checksumSHA1": "4ebzIE2Jvj6+SG6yGFSXN8scgfo=",
"path": "github.com/prometheus/tsdb/index", "path": "github.com/prometheus/tsdb/index",
"revision": "494acd307058387ced7646f9996b0f7372eaa558", "revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
"revisionTime": "2018-02-15T11:29:47Z" "revisionTime": "2018-03-13T20:20:03Z"
}, },
{ {
"checksumSHA1": "Va8HWvOFTwFeewZFadMAOzNGDps=", "checksumSHA1": "Va8HWvOFTwFeewZFadMAOzNGDps=",
"path": "github.com/prometheus/tsdb/labels", "path": "github.com/prometheus/tsdb/labels",
"revision": "494acd307058387ced7646f9996b0f7372eaa558", "revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
"revisionTime": "2018-02-15T11:29:47Z" "revisionTime": "2018-03-13T20:20:03Z"
}, },
{ {
"checksumSHA1": "5SYLEhADhdBVZAGPVHWggQl7H8k=", "checksumSHA1": "5SYLEhADhdBVZAGPVHWggQl7H8k=",

Loading…
Cancel
Save