i3wangyi commented on a change in pull request #662: Mitigate controller 
leadership switch latency - improve leader -> standby
URL: https://github.com/apache/helix/pull/662#discussion_r373746832
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java
 ##########
 @@ -501,23 +501,20 @@ private void 
subscribeForChangesAsyn(NotificationContext.Type callbackType, Stri
 
   private void subscribeForChanges(NotificationContext.Type callbackType, 
String path,
       boolean watchChild) {
-    logger.info("Subscribing changes listener to path: " + path + ", type: " + 
callbackType
-        + ", listener: " + _listener);
+    logger
+        .info("Subscribing changes listener on path: {}, callbackType: {}, 
listener: {}, isWatchChild: {}",
+            path, callbackType, _listener, watchChild);
 
     long start = System.currentTimeMillis();
     if (_eventTypes.contains(EventType.NodeDataChanged)
         || _eventTypes.contains(EventType.NodeCreated)
         || _eventTypes.contains(EventType.NodeDeleted)) {
-      logger.info("Subscribing data change listener to path: " + path);
 
 Review comment:
   These logs are actually redundant. The private subscribeForChanges() will 
eventually call other private methods 
   ```
     private void subscribeChildChange(String path, NotificationContext.Type 
callbackType) {
       if (callbackType == NotificationContext.Type.INIT
           || callbackType == NotificationContext.Type.CALLBACK) {
         if (logger.isDebugEnabled()) {
           logger.debug(_manager.getInstanceName() + " subscribes child-change. 
path: " + path
               + ", listener: " + _listener);
         }
         _zkClient.subscribeChildChanges(path, this);
       } else if (callbackType == NotificationContext.Type.FINALIZE) {
         logger.info(_manager.getInstanceName() + " unsubscribe child-change. 
path: " + path
             + ", listener: " + _listener);
   
         _zkClient.unsubscribeChildChanges(path, this);
       }
     }
   
     private void subscribeDataChange(String path, NotificationContext.Type 
callbackType) {
       if (callbackType == NotificationContext.Type.INIT
           || callbackType == NotificationContext.Type.CALLBACK) {
         if (logger.isDebugEnabled()) {
           logger.debug(_manager.getInstanceName() + " subscribe data-change. 
path: " + path
               + ", listener: " + _listener);
         }
         _zkClient.subscribeDataChanges(path, this);
       } else if (callbackType == NotificationContext.Type.FINALIZE) {
         logger.info(_manager.getInstanceName() + " unsubscribe data-change. 
path: " + path
             + ", listener: " + _listener);
   
         _zkClient.unsubscribeDataChanges(path, this);
       }
     }
   ```
   To perform the actual listener subscription. I think keeping the verbose log 
in the last step is sufficient enough and you know helix.log is flooded with 
all listeners logs

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to