somandal commented on code in PR #15722:
URL: https://github.com/apache/pinot/pull/15722#discussion_r2076618643


##########
pinot-server/src/main/java/org/apache/pinot/server/starter/helix/BaseServerStarter.java:
##########
@@ -1058,4 +1072,19 @@ private void initSegmentFetcher(PinotConfiguration 
config)
   protected AdminApiApplication createServerAdminApp() {
     return new AdminApiApplication(_serverInstance, _accessControlFactory, 
_serverConf);
   }
+
+  private void refreshMessageCount() {
+    try {
+      HelixDataAccessor dataAccessor = _helixManager.getHelixDataAccessor();
+      List<String> children = dataAccessor.getBaseDataAccessor()
+          .getChildNames(String.format("/%s/INSTANCES/%s/MESSAGES", 
_helixClusterName, _instanceId), 0);
+      _cachedMessageCount.set(children == null ? 0 : children.size());
+    } catch (Exception e) {
+      LOGGER.warn("Failed to get Helix message count", e);
+      _cachedMessageCount.set(0);

Review Comment:
   yeah makes sense, let's retain the value



-- 
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-unsubscr...@pinot.apache.org

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


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

Reply via email to