Skip to content

Commit

Permalink
Fix defer
Browse files Browse the repository at this point in the history
  • Loading branch information
grobinson-grafana committed Jul 25, 2024
1 parent de59939 commit 0cd0e16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ingester-rf1/flush.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (i *Ingester) flushSegment(ctx context.Context, j int, w *wal.SegmentWriter
start := time.Now()

i.metrics.flushesTotal.Add(1)
defer i.metrics.flushDuration.Observe(time.Since(start).Seconds())
defer func() { i.metrics.flushDuration.Observe(time.Since(start).Seconds()) }()

buf := i.flushBuffers[j]
defer buf.Reset()
Expand Down

0 comments on commit 0cd0e16

Please sign in to comment.