fx19880617 commented on a change in pull request #6020:
URL: https://github.com/apache/incubator-pinot/pull/6020#discussion_r494081645



##########
File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
##########
@@ -223,6 +228,16 @@ public synchronized void start(HelixManager 
helixZkManager) {
     boolean caseInsensitive = 
Boolean.parseBoolean(configs.get(Helix.ENABLE_CASE_INSENSITIVE_KEY)) || Boolean
         
.parseBoolean(configs.get(Helix.DEPRECATED_ENABLE_CASE_INSENSITIVE_KEY));
     _tableCache = new TableCache(_propertyStore, caseInsensitive);
+
+    _clusterInstanceConfigChangeListener = new 
ClusterInstanceConfigChangeListener(_helixZkManager);
+    _clusterLiveInstanceChangeListener = new 
ClusterLiveInstanceChangeListener(_helixDataAccessor, _keyBuilder);
+    try {
+      addConfigListeners(_clusterInstanceConfigChangeListener);
+      addLiveInstanceListeners(_clusterLiveInstanceChangeListener);
+    } catch (Exception e) {
+      LOGGER.warn(
+          "Unable to add config listener in controller. This will result in 
incorrect response from controller's broker API");

Review comment:
       1. separate the try catch and error msg for two listeners
   2. shall we consider to fallback to direct fetch api?

##########
File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
##########
@@ -2458,6 +2486,7 @@ private void waitForSegmentsBecomeOnline(String 
tableNameWithType, Set<String> s
     return onlineSegments;
   }
 
+

Review comment:
       remove this

##########
File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java
##########
@@ -223,6 +228,16 @@ public synchronized void start(HelixManager 
helixZkManager) {
     boolean caseInsensitive = 
Boolean.parseBoolean(configs.get(Helix.ENABLE_CASE_INSENSITIVE_KEY)) || Boolean
         
.parseBoolean(configs.get(Helix.DEPRECATED_ENABLE_CASE_INSENSITIVE_KEY));
     _tableCache = new TableCache(_propertyStore, caseInsensitive);
+
+    _clusterInstanceConfigChangeListener = new 
ClusterInstanceConfigChangeListener(_helixZkManager);
+    _clusterLiveInstanceChangeListener = new 
ClusterLiveInstanceChangeListener(_helixDataAccessor, _keyBuilder);
+    try {
+      addConfigListeners(_clusterInstanceConfigChangeListener);
+      addLiveInstanceListeners(_clusterLiveInstanceChangeListener);
+    } catch (Exception e) {
+      LOGGER.warn(
+          "Unable to add config listener in controller. This will result in 
incorrect response from controller's broker API");

Review comment:
       For *ChangeListener, shall we add a transparent mode, which allows the 
api to fetch information directly from helix?
   So in case of the listener register failure, pinot won't fail.




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

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