Unverified Commit bc6058c8 by Fabian Reinartz Committed by GitHub

Merge pull request #3952 from prometheus/cut221

*: cut 2.2.1
parents 0847a605 f22e5dce
Pipeline #15462 passed with stages
in 3 minutes 3 seconds
## 2.2.1 / 2018-03-13
* [BUGFIX] Fix data loss in TSDB on compaction
* [BUGFIX] Correctly stop timer in remote-write path
* [BUGFIX] Fix deadlock triggerd by loading targets page
* [BUGFIX] Fix incorrect buffering of samples on range selection queries
* [BUGFIX] Handle large index files on windows properly
## 2.2.0 / 2018-03-08
* [CHANGE] Rename file SD mtime metric.
......
// +build windows
package fileutil
const maxMapSize = 0x7FFFFFFF // 2GB
// +build windows
package fileutil
const maxMapSize = 0xFFFFFFFFFFFF // 256TB
......@@ -19,14 +19,14 @@ import (
"unsafe"
)
func mmap(f *os.File, sz int) ([]byte, error) {
low, high := uint32(sz), uint32(sz>>32)
func mmap(f *os.File, size int) ([]byte, error) {
low, high := uint32(size), uint32(size>>32)
h, errno := syscall.CreateFileMapping(syscall.Handle(f.Fd()), nil, syscall.PAGE_READONLY, high, low, nil)
if h == 0 {
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 {
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 (*[1 << 30]byte)(unsafe.Pointer(addr))[:sz], nil
return (*[maxMapSize]byte)(unsafe.Pointer(addr))[:size], nil
}
func munmap(b []byte) error {
......
......@@ -61,6 +61,9 @@ func repairBadIndexVersion(logger log.Logger, dir string) error {
if err := repl.Close(); err != nil {
return err
}
if err := broken.Close(); err != nil {
return err
}
if err := renameFile(repl.Name(), broken.Name()); err != nil {
return err
}
......
......@@ -800,40 +800,40 @@
"revisionTime": "2016-04-11T19:08:41Z"
},
{
"checksumSHA1": "JfxP001vgt0P+hEDk/if0bxa8xU=",
"checksumSHA1": "vNslgGjRBqauFmVIBTkvEWwvURg=",
"path": "github.com/prometheus/tsdb",
"revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
"revisionTime": "2018-03-13T20:20:03Z"
"revision": "659ed644294eec6310cef0685b002a3aed8c8f85",
"revisionTime": "2018-03-14T13:49:50Z"
},
{
"checksumSHA1": "S7F4yWxVLhxQNHMdgoOo6plmOOs=",
"path": "github.com/prometheus/tsdb/chunkenc",
"revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
"revisionTime": "2018-03-13T20:20:03Z"
"revision": "659ed644294eec6310cef0685b002a3aed8c8f85",
"revisionTime": "2018-03-14T13:49:50Z"
},
{
"checksumSHA1": "+zsn1i8cqwgZXL8Bg6jDy32xjAo=",
"path": "github.com/prometheus/tsdb/chunks",
"revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
"revisionTime": "2018-03-13T20:20:03Z"
"revision": "659ed644294eec6310cef0685b002a3aed8c8f85",
"revisionTime": "2018-03-14T13:49:50Z"
},
{
"checksumSHA1": "h49AAcJ5+iRBwCgbfQf+2T1E1ZE=",
"checksumSHA1": "T7qvg4VhFLklT3g+qPkUWxBo0yw=",
"path": "github.com/prometheus/tsdb/fileutil",
"revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
"revisionTime": "2018-03-13T20:20:03Z"
"revision": "659ed644294eec6310cef0685b002a3aed8c8f85",
"revisionTime": "2018-03-14T13:49:50Z"
},
{
"checksumSHA1": "4ebzIE2Jvj6+SG6yGFSXN8scgfo=",
"path": "github.com/prometheus/tsdb/index",
"revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
"revisionTime": "2018-03-13T20:20:03Z"
"revision": "659ed644294eec6310cef0685b002a3aed8c8f85",
"revisionTime": "2018-03-14T13:49:50Z"
},
{
"checksumSHA1": "Va8HWvOFTwFeewZFadMAOzNGDps=",
"path": "github.com/prometheus/tsdb/labels",
"revision": "00404ae5ab578bb550377a17aab5511deb0592c5",
"revisionTime": "2018-03-13T20:20:03Z"
"revision": "659ed644294eec6310cef0685b002a3aed8c8f85",
"revisionTime": "2018-03-14T13:49:50Z"
},
{
"checksumSHA1": "5SYLEhADhdBVZAGPVHWggQl7H8k=",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment