AmatyaAvadhanula commented on code in PR #12743:
URL: https://github.com/apache/druid/pull/12743#discussion_r914458981


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/stats/TaskRealtimeMetricsMonitor.java:
##########
@@ -50,6 +50,8 @@ public class TaskRealtimeMetricsMonitor extends 
AbstractMonitor
   private FireDepartmentMetrics previousFireDepartmentMetrics;
   private RowIngestionMetersTotals previousRowIngestionMetersTotals;
 
+  private volatile boolean lastRoundMetricsToBePushed = true;

Review Comment:
   Wouldn't it be better to initialize this to `false` and set it to true in an 
overriding `start` method for this class?
   1) It would prevent emission of metrics before the monitor has actually 
started
   2) It may allow for reuse (Might not be intended)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to