mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-27 06:29:42 -08:00
vendor: update tsdb
This commit is contained in:
parent
0847a605a7
commit
a947750dd6
5
vendor/github.com/prometheus/tsdb/fileutil/mmap_386.go
generated
vendored
Normal file
5
vendor/github.com/prometheus/tsdb/fileutil/mmap_386.go
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
// +build windows
|
||||||
|
|
||||||
|
package fileutil
|
||||||
|
|
||||||
|
const maxMapSize = 0x7FFFFFFF // 2GB
|
5
vendor/github.com/prometheus/tsdb/fileutil/mmap_amd64.go
generated
vendored
Normal file
5
vendor/github.com/prometheus/tsdb/fileutil/mmap_amd64.go
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
// +build windows
|
||||||
|
|
||||||
|
package fileutil
|
||||||
|
|
||||||
|
const maxMapSize = 0xFFFFFFFFFFFF // 256TB
|
8
vendor/github.com/prometheus/tsdb/fileutil/mmap_windows.go
generated
vendored
8
vendor/github.com/prometheus/tsdb/fileutil/mmap_windows.go
generated
vendored
|
@ -19,14 +19,14 @@ import (
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
func mmap(f *os.File, sz int) ([]byte, error) {
|
func mmap(f *os.File, size int) ([]byte, error) {
|
||||||
low, high := uint32(sz), uint32(sz>>32)
|
low, high := uint32(size), uint32(size>>32)
|
||||||
h, errno := syscall.CreateFileMapping(syscall.Handle(f.Fd()), nil, syscall.PAGE_READONLY, high, low, nil)
|
h, errno := syscall.CreateFileMapping(syscall.Handle(f.Fd()), nil, syscall.PAGE_READONLY, high, low, nil)
|
||||||
if h == 0 {
|
if h == 0 {
|
||||||
return nil, os.NewSyscallError("CreateFileMapping", errno)
|
return nil, os.NewSyscallError("CreateFileMapping", errno)
|
||||||
}
|
}
|
||||||
|
|
||||||
addr, errno := syscall.MapViewOfFile(h, syscall.FILE_MAP_READ, 0, 0, uintptr(sz))
|
addr, errno := syscall.MapViewOfFile(h, syscall.FILE_MAP_READ, 0, 0, uintptr(size))
|
||||||
if addr == 0 {
|
if addr == 0 {
|
||||||
return nil, os.NewSyscallError("MapViewOfFile", errno)
|
return nil, os.NewSyscallError("MapViewOfFile", errno)
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ func mmap(f *os.File, sz int) ([]byte, error) {
|
||||||
return nil, os.NewSyscallError("CloseHandle", err)
|
return nil, os.NewSyscallError("CloseHandle", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (*[1 << 30]byte)(unsafe.Pointer(addr))[:sz], nil
|
return (*[maxMapSize]byte)(unsafe.Pointer(addr))[:size], nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func munmap(b []byte) error {
|
func munmap(b []byte) error {
|
||||||
|
|
3
vendor/github.com/prometheus/tsdb/repair.go
generated
vendored
3
vendor/github.com/prometheus/tsdb/repair.go
generated
vendored
|
@ -61,6 +61,9 @@ func repairBadIndexVersion(logger log.Logger, dir string) error {
|
||||||
if err := repl.Close(); err != nil {
|
if err := repl.Close(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if err := broken.Close(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
if err := renameFile(repl.Name(), broken.Name()); err != nil {
|
if err := renameFile(repl.Name(), broken.Name()); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
28
vendor/vendor.json
vendored
28
vendor/vendor.json
vendored
|
@ -800,40 +800,40 @@
|
||||||
"revisionTime": "2016-04-11T19:08:41Z"
|
"revisionTime": "2016-04-11T19:08:41Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "JfxP001vgt0P+hEDk/if0bxa8xU=",
|
"checksumSHA1": "vNslgGjRBqauFmVIBTkvEWwvURg=",
|
||||||
"path": "github.com/prometheus/tsdb",
|
"path": "github.com/prometheus/tsdb",
|
||||||
"revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
|
"revision": "659ed644294eec6310cef0685b002a3aed8c8f85",
|
||||||
"revisionTime": "2018-03-13T20:20:03Z"
|
"revisionTime": "2018-03-14T13:49:50Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "S7F4yWxVLhxQNHMdgoOo6plmOOs=",
|
"checksumSHA1": "S7F4yWxVLhxQNHMdgoOo6plmOOs=",
|
||||||
"path": "github.com/prometheus/tsdb/chunkenc",
|
"path": "github.com/prometheus/tsdb/chunkenc",
|
||||||
"revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
|
"revision": "659ed644294eec6310cef0685b002a3aed8c8f85",
|
||||||
"revisionTime": "2018-03-13T20:20:03Z"
|
"revisionTime": "2018-03-14T13:49:50Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "+zsn1i8cqwgZXL8Bg6jDy32xjAo=",
|
"checksumSHA1": "+zsn1i8cqwgZXL8Bg6jDy32xjAo=",
|
||||||
"path": "github.com/prometheus/tsdb/chunks",
|
"path": "github.com/prometheus/tsdb/chunks",
|
||||||
"revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
|
"revision": "659ed644294eec6310cef0685b002a3aed8c8f85",
|
||||||
"revisionTime": "2018-03-13T20:20:03Z"
|
"revisionTime": "2018-03-14T13:49:50Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "h49AAcJ5+iRBwCgbfQf+2T1E1ZE=",
|
"checksumSHA1": "T7qvg4VhFLklT3g+qPkUWxBo0yw=",
|
||||||
"path": "github.com/prometheus/tsdb/fileutil",
|
"path": "github.com/prometheus/tsdb/fileutil",
|
||||||
"revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
|
"revision": "659ed644294eec6310cef0685b002a3aed8c8f85",
|
||||||
"revisionTime": "2018-03-13T20:20:03Z"
|
"revisionTime": "2018-03-14T13:49:50Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "4ebzIE2Jvj6+SG6yGFSXN8scgfo=",
|
"checksumSHA1": "4ebzIE2Jvj6+SG6yGFSXN8scgfo=",
|
||||||
"path": "github.com/prometheus/tsdb/index",
|
"path": "github.com/prometheus/tsdb/index",
|
||||||
"revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
|
"revision": "659ed644294eec6310cef0685b002a3aed8c8f85",
|
||||||
"revisionTime": "2018-03-13T20:20:03Z"
|
"revisionTime": "2018-03-14T13:49:50Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "Va8HWvOFTwFeewZFadMAOzNGDps=",
|
"checksumSHA1": "Va8HWvOFTwFeewZFadMAOzNGDps=",
|
||||||
"path": "github.com/prometheus/tsdb/labels",
|
"path": "github.com/prometheus/tsdb/labels",
|
||||||
"revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
|
"revision": "659ed644294eec6310cef0685b002a3aed8c8f85",
|
||||||
"revisionTime": "2018-03-13T20:20:03Z"
|
"revisionTime": "2018-03-14T13:49:50Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "5SYLEhADhdBVZAGPVHWggQl7H8k=",
|
"checksumSHA1": "5SYLEhADhdBVZAGPVHWggQl7H8k=",
|
||||||
|
|
Loading…
Reference in a new issue