rdhabalia opened a new pull request #573: Fix: register zk-stats listener after broker service started URL: https://github.com/apache/incubator-pulsar/pull/573 ### Motivation As #568 build couldn't complete intermittently: After enabling debug log, found out that build exists because `ZooKeeperSessionWatcher` couldn't get heartbeat with in zksession timeout. ``` [pulsar-zk-session-watcher-274-1:ZooKeeperSessionWatcher@164] - zoo keeper disconnected, waiting to reconnect, time remaining 0 [pulsar-zk-session-watcher-75235-1:ZooKeeperSessionWatcher@158] - timeout expired for reconnecting, invoking shutdown service ``` After digging into it, it seems issue is not BK-ZkClient library but the processing time of zk-response into aspectj-advice. [ZKClientCnxAspect](https://github.com/apache/incubator-pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/zookeeper/aspectj/ClientCnxnAspect.java#L72) intercept zk-response call and if takes more than few msec then zk-client somewhere lose the event (not sure what exactly happens in zk-client) and it doesn't serve any subsequent zk-response which ultimately cause zk-timeout. ### Modifications - run zk-stats-recorder into separate thread - remove zk-stats-listener on pulsar-service close ### Result test Build should not exist. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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
With regards, Apache Git Services