snowcrumble commented on issue #308: Problems when ZK Leader shuts down URL: https://github.com/apache/pulsar/issues/308#issuecomment-585043270 > The question here is why should the leader election take so much time. Can you share the hardware and ZK config? My zk elect time is about 10 seconds, is that reasonable? zk-0 is new follower zk-1 is old leader which was on the crashed node zk2 is new leader below is the logs: zk-0.log ``` 04:51:47.726 [QuorumPeer[myid=1]/0.0.0.0:2181] INFO org.apache.zookeeper.server.quorum.QuorumPeer - FOLLOWING 04:51:47.727 [QuorumPeer[myid=1]/0.0.0.0:2181] INFO org.apache.zookeeper.server.ZooKeeperServer - Created server with tickTime 2000 minSessionTimeout 4000 maxSessionTimeout 40000 datadir data/zookeeper/version-2 snapdir data/zookeeper/version-2 04:51:47.727 [QuorumPeer[myid=1]/0.0.0.0:2181] INFO org.apache.zookeeper.server.quorum.Learner - FOLLOWING - LEADER ELECTION TOOK - 6405 04:51:47.728 [QuorumPeer[myid=1]/0.0.0.0:2181] INFO org.apache.zookeeper.server.quorum.QuorumPeer - Resolved hostname: zk-2.zookeeper.pulsar.svc.cluster.local to address: zk-2.zookeeper.pulsar.svc.cluster.local/10.30.2.2 04:51:47.740 [QuorumPeer[myid=1]/0.0.0.0:2181] INFO org.apache.zookeeper.server.quorum.Learner - Getting a diff from the leader 0x100024c1c ``` zk-2.log ``` 04:51:47.727 [QuorumPeer[myid=3]/0.0.0.0:2181] INFO org.apache.zookeeper.server.quorum.QuorumPeer - LEADING 04:51:47.727 [QuorumPeer[myid=3]/0.0.0.0:2181] INFO org.apache.zookeeper.server.ZooKeeperServer - Created server with tickTime 2000 minSessionTimeout 4000 maxSessionTimeout 40000 datadir data/zookeeper/version-2 snapdir data/zookeeper/version-2 04:51:47.727 [QuorumPeer[myid=3]/0.0.0.0:2181] INFO org.apache.zookeeper.server.quorum.Leader - LEADING - LEADER ELECTION TOOK - 10421 04:51:47.734 [LearnerHandler-/10.30.2.141:43982] INFO org.apache.zookeeper.server.quorum.LearnerHandler - Follower sid: 1 : info : org.apache.zookeeper.server.quorum.QuorumPeer$QuorumServer@6fe50a68 ```
---------------------------------------------------------------- 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
