mcvsubbu commented on a change in pull request #7753:
URL: https://github.com/apache/pinot/pull/7753#discussion_r749633830



##########
File path: 
pinot-common/src/main/java/org/apache/pinot/common/utils/ServiceStatus.java
##########
@@ -242,22 +240,19 @@ public synchronized Status getServiceStatus() {
         return _serviceStatus;
       }
       long now = System.currentTimeMillis();
-      int numConsumingSegmentsNotCaughtUp = 
_getNumConsumingSegmentsNotReachedTheirLatestOffset.get();
+      boolean isConsumingSegmentsCounterProvided = 
_getNumConsumingSegmentsNotReachedTheirLatestOffset != null;

Review comment:
       Is it possible that the config is turned on, but the num segments not 
reached latest is zero for now (but can get to a higher value later, say on the 
next service status call)?
   
   If so, it may be better to check the config here than the state.




-- 
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