somandal commented on code in PR #15722:
URL: https://github.com/apache/pinot/pull/15722#discussion_r2076571757
##########
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:
just thinking out loud, should we set this to a -ve value on error? okay
with leaving as 0, but this might be misleading
--
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]