From 95f28cb5717a8676dc4c2fd816c89ec484152d35 Mon Sep 17 00:00:00 2001 From: Jacob Marble Date: Fri, 10 May 2019 11:25:43 -0700 Subject: [PATCH] fix(series file): Sync series segment after truncate (#13836) (#13859) --- tsdb/series_segment.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tsdb/series_segment.go b/tsdb/series_segment.go index a7246e3e6b..16b32c5aa8 100644 --- a/tsdb/series_segment.go +++ b/tsdb/series_segment.go @@ -70,6 +70,8 @@ func CreateSeriesSegment(id uint16, path string) (*SeriesSegment, error) { return nil, err } else if err := f.Truncate(int64(SeriesSegmentSize(id))); err != nil { return nil, err + } else if err := f.Sync(); err != nil { + return nil, err } else if err := f.Close(); err != nil { return nil, err }