[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012915#comment-13012915
 ] 

Flavio Junqueira commented on ZOOKEEPER-1036:
---------------------------------------------

LeaderZooKeeperServer should not be null, but the session tracker should be. 
Note that the call to touch(...) in LearnerHandler makes a call to the session 
tracker object, which is created upon calling startup() on ZooKeeperServer. The 
method startup() is only called upon getting an ack from a quorum.

But, it does sound like we are not expecting a null pointer there in 
LearnerHandler when we process a revalidate message, and a null pointer might 
cause us trouble there. It sounds like we need to check if the session tracker 
exists, and if it doesn't, then either we fail the request or wait until it 
becomes available. Waiting is an option if the session tracker being null only 
happens at startup, which seems to be the case.

> send UPTODATE to follower until a quorum of servers synced with leader
> ----------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1036
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1036
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>            Reporter: jiangwen wei
>
> 1. current process
> when leader fail, a new leader will be elected, followers will sync with the
> new leader.
> After synced, leader send UPTODATE to follower.
> 2. a corner case
> but there is a corner case, things will go wrong.
> suppose message M only exists on leader, after a follower synced with
> leader, the client connected to the follower will see M.
> but it only exists on two servers, not on a quorum of servers. If the new
> leader and the follower failed, message M is lost, but M is already seen by
> client.
> 3. one solution
> So I think UPTODATE  can be sent to follower only when a quorum of server
> synced with the leader.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to