Karolos Antoniadis created ZOOKEEPER-3485:
---------------------------------------------

             Summary: Measure reconfiguration time
                 Key: ZOOKEEPER-3485
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3485
             Project: ZooKeeper
          Issue Type: Improvement
    Affects Versions: 3.5.5
            Reporter: Karolos Antoniadis


This issue is created after some initial discussion in the _dev_ mailing list 
(subject "Leader election logging during reconfiguration").

 

There does not seem to be a good way to measure reconfiguration time in 
ZooKeeper. Additionally, reconfiguration time is mixed together with leader 
election time*.* For instance, during reconfiguration, ZooKeeper logs a  
{{LEADER ELECTION TOOK}} message even though no leader election might takes 
place.
  
 This can be reproduced by following these steps:
 1) start a ZooKeeper cluster (e.g., 3 participants)
 2) start a client that connects to some follower
 3) perform a _reconfig_ operation that removes the leader from the cluster
  
 After the reconfiguration takes place, we can see that the log files of the 
remaining participants contain a "_LEADER ELECTION TOOK_" message. For example, 
a line that contains
 _2019-07-29 23:07:38,518 [myid:2] - INFO  
[QuorumPeer[myid=2](plain=0.0.0.0:2792)(secure=disabled):Follower@75] - 
FOLLOWING - LEADER ELECTION TOOK - 57 MS_
  
 However, no leader election took place, in the sense that no server went 
_LOOKING_ and then started voting and sending notifications to other 
participants as would be in a normal leader election. It seems, that before the 
_reconfig_ is committed, the participant that is going to be the next leader is 
already decided (see here: 
[https://github.com/apache/zookeeper/blob/master/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Leader.java#L865]).
  

*Goal* of this issue/improvement is to measure in a better and more accurate 
way the time it takes for a reconfiguration to complete, as well as, to clearly 
distinguish the measurement of reconfiguration versus leader election.


  
  
  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to