Skip to content

Commit

Permalink
remove unnecessary if
Browse files Browse the repository at this point in the history
  • Loading branch information
thepalbi committed Nov 7, 2023
1 parent 24e6b37 commit 83c76f9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions component/common/loki/client/queue_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,9 @@ func (c *queueClient) AppendEntries(entries wal.RefEntries, segment int) error {
level.Debug(c.logger).Log("msg", "series for entry not found")
}

// emit metric tracking max seen timestamp in WAL entry
if maxSeenTimestamp != -1 {
c.qcMetrics.lastReadTimestamp.WithLabelValues().Set(float64(maxSeenTimestamp))
}
// It's safe to assume that upon an AppendEntries call, there will always be at least
// one entry.
c.qcMetrics.lastReadTimestamp.WithLabelValues().Set(float64(maxSeenTimestamp))

return nil
}
Expand Down

0 comments on commit 83c76f9

Please sign in to comment.