Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adamxchen committed Feb 2, 2024
1 parent 8ae7d24 commit 405bdeb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1309,13 +1309,13 @@ private void maybeUnsubscribeCompletedPartitions(Store store) {

private void recordMaxIdleTime() {
if (emitMetrics.get()) {
long maxIdleTime = 0;
long curTime = System.currentTimeMillis(), oldest = curTime;
for (PartitionConsumptionState state: partitionConsumptionStateMap.values()) {
if (state != null) {
maxIdleTime = Math.max(maxIdleTime, state.getLatestPolledMessageTimestampInMs());
oldest = Math.min(oldest, state.getLatestPolledMessageTimestampInMs());
}
}
versionedIngestionStats.recordMaxIdleTime(storeName, versionNumber, maxIdleTime);
versionedIngestionStats.recordMaxIdleTime(storeName, versionNumber, curTime - oldest);
}
}

Expand Down

0 comments on commit 405bdeb

Please sign in to comment.