Skip to content

Commit

Permalink
Use right timestamp for low/high water mark request
Browse files Browse the repository at this point in the history
  • Loading branch information
weeco committed Feb 24, 2021
1 parent a9e4731 commit 8db3809
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prometheus/collect_topic_partition_offsets.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ func (e *Exporter) collectTopicPartitionOffsets(ctx context.Context, ch chan<- p
isOk := true

// Low Watermarks
lowWaterMarks, err := e.minionSvc.ListOffsetsCached(ctx, -1)
lowWaterMarks, err := e.minionSvc.ListOffsetsCached(ctx, -2)
if err != nil {
e.logger.Error("failed to fetch low water marks", zap.Error(err))
return false
}
// High Watermarks
highWaterMarks, err := e.minionSvc.ListOffsetsCached(ctx, -2)
highWaterMarks, err := e.minionSvc.ListOffsetsCached(ctx, -1)
if err != nil {
e.logger.Error("failed to fetch low water marks", zap.Error(err))
return false
Expand Down

0 comments on commit 8db3809

Please sign in to comment.