From 7d467c20479dd55ce92f1297b2ee3be42be2bf30 Mon Sep 17 00:00:00 2001 From: Jason Wilder Date: Tue, 12 Sep 2017 10:30:10 -0600 Subject: [PATCH] Fix windows unmapping of anonymous index slice --- tsdb/engine/tsm1/reader.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tsdb/engine/tsm1/reader.go b/tsdb/engine/tsm1/reader.go index 0c70d89b35..ddca783d3d 100644 --- a/tsdb/engine/tsm1/reader.go +++ b/tsdb/engine/tsm1/reader.go @@ -7,6 +7,7 @@ import ( "io" "math" "os" + "runtime" "sync" "sync/atomic" @@ -1033,6 +1034,10 @@ func (d *indirectIndex) Size() uint32 { } func (d *indirectIndex) Close() error { + // Windows doesn't use the anonymous map for the offsets index + if runtime.GOOS == "windows" { + return nil + } return munmap(d.offsets[:cap(d.offsets)]) }