You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/11/15 19:49:51 UTC

[GitHub] [pinot] mcvsubbu commented on a change in pull request #7753: Add config for enabling realtime offset based consumption status checker

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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org