Merge pull request #3951 from prometheus/tsdbup3

vendor: update prometheus/tsdb
This commit is contained in:
Fabian Reinartz 2018-03-13 21:47:55 +01:00 committed by GitHub
commit fcb8e9ac95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 19 deletions

View File

@ -151,16 +151,11 @@ func (c *LeveledCompactor) Plan(dir string) ([]string, error) {
if err != nil {
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 {
return nil, nil
}
dirs = dirs[:len(dirs)-1]
var dms []dirMeta
for _, dir := range dirs {
meta, err := readMetaFile(dir)
if err != nil {
@ -176,6 +171,10 @@ func (c *LeveledCompactor) plan(dms []dirMeta) ([]string, error) {
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
for _, dm := range c.selectDirs(dms) {
res = append(res, dm.dir)

View File

@ -653,6 +653,11 @@ func newReader(b ByteSlice, c io.Closer) (*Reader, error) {
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.
type Range struct {
Start, End int64

28
vendor/vendor.json vendored
View File

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