You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2017/11/18 02:04:47 UTC

[GitHub] rdhabalia opened a new pull request #913: Fail broker start if broker-znode created by other zk-session

rdhabalia opened a new pull request #913: Fail broker start if broker-znode created by other zk-session
URL: https://github.com/apache/incubator-pulsar/pull/913
 
 
   ### Motivation
   
   Sometimes, broker restarts without completing clean shutdown which may miss to delete broker-registration-znode (`/loadbalance/brokers/<broker>`). And when broker restarts, it sees broker's ephemeral znode is already present as previous broker-zk-session is not expired yet and it starts pulsar-service successfully. But after sometime, previous zk-session expires and broker-znode gets deleted that removes broker from available list and current broker logs following exceptions while writing load-report.
   ```
   18:41:07.966 [pulsar-load-manager-11-1] WARN  o.a.p.b.l.i.ModularLoadManagerImpl   - Error writing broker data on ZooKeeper: {}
   org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /loadbalance/brokers/broker:4080
           at org.apache.zookeeper.KeeperException.create(KeeperException.java:111) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
           at org.apache.zookeeper.KeeperException.create(KeeperException.java:51) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
           at org.apache.zookeeper.ZooKeeper.setData(ZooKeeper.java:1270) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
           at org.apache.bookkeeper.zookeeper.ZooKeeperClient.access$2501(ZooKeeperClient.java:60) ~[bookkeeper-server-4.3.1.56-yahoo.jar:4.3.1.56-yahoo]
           at org.apache.bookkeeper.zookeeper.ZooKeeperClient$20.call(ZooKeeperClient.java:800) ~[bookkeeper-server-4.3.1.56-yahoo.jar:4.3.1.56-yahoo]
           at org.apache.bookkeeper.zookeeper.ZooKeeperClient$20.call(ZooKeeperClient.java:794) ~[bookkeeper-server-4.3.1.56-yahoo.jar:4.3.1.56-yahoo]
           at org.apache.bookkeeper.zookeeper.ZooWorker.syncCallWithRetries(ZooWorker.java:122) ~[bookkeeper-server-4.3.1.56-yahoo.jar:4.3.1.56-yahoo]
           at org.apache.bookkeeper.zookeeper.ZooKeeperClient.setData(ZooKeeperClient.java:794) ~[bookkeeper-server-4.3.1.56-yahoo.jar:4.3.1.56-yahoo]
           at org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerImpl.writeBrokerDataOnZooKeeper(ModularLoadManagerImpl.java:739) ~[pulsar-broker-1.19.2-incubating-yahoo.jar:1.19.2-incubating-yahoo]
           at org.apache.pulsar.broker.loadbalance.impl.ModularLoadManagerWrapper.writeLoadReportOnZookeeper(ModularLoadManagerWrapper.java:105) [pulsar-broker-1.19.2-incubating-yahoo.jar:1.19.2-incubating-yahoo]
           at org.apache.pulsar.broker.loadbalance.LoadReportUpdaterTask.run(LoadReportUpdaterTask.java:41) [pulsar-broker-1.19.2-incubating-yahoo.jar:1.19.2-incubating-yahoo]
           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_131]
           at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_131]
           at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_131]
           at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_131]
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_131]
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_131]
   ```
   
   ### Modifications
   
   Fail broker start if ephemeral broker-znode is created by other zk-session.
   
   ### Result
   
   It will prevent broker to go in condition where it becomes unavailable after successfully restarted.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services