Skip to content

Commit

Permalink
fix(tsdb): sync series segment to disk after writing (influxdata#22566)
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss authored and chengshiwen committed Aug 11, 2024
1 parent aa6c21e commit 4c4ac1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tsdb/series_segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,10 @@ func (s *SeriesSegment) Flush() error {
if s.w == nil {
return nil
}
return s.w.Flush()
if err := s.w.Flush(); err != nil {
return err
}
return s.file.Sync()
}

// AppendSeriesIDs appends all the segments ids to a slice. Returns the new slice.
Expand Down

0 comments on commit 4c4ac1f

Please sign in to comment.