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

Alexander Shraer commented on ZOOKEEPER-2513:
---------------------------------------------

In Learner.java, there are 3 different places where majorChange is set to true 
and an exception is thrown. The main intention for this JIRA was to verify 
for each such instance that the learner can recover from an exception being 
thrown, ideally by adding a test case for each instance, similar to what you 
were doing for ZK-2172. This will probably show whether the server can recover.

Anyway, it seems a bit wasteful not to process an operation and require the 
leader to send the diff again after recovering. Also the reconfig isn't 
considered committed
while it has been already processed by the learner. It may be ok, but its easy 
to avoid since we can choose when to throw an exception.

> majorChange exceptions during leader sync
> -----------------------------------------
>
>                 Key: ZOOKEEPER-2513
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2513
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.5.2
>            Reporter: Alexander Shraer
>            Assignee: Arshad Mohammad
>            Priority: Critical
>
> In Learner.java there are exceptions being thrown in case majorChange = true, 
> i.e., a reconfig is encountered in the stream of updates from the leader. 
> There may be two problems in the way such exceptions are thrown:
> 1. important actions, e.g., processTxn, will not be done if an exception is 
> thrown
> 2. its unclear that the learner will be able to continue where it left off in 
> the process of syncing with the leader, if that sync is interrupted by an 
> exception.
> This requires further investigation. Whereas similar code in Follower and 
> Observer is extensively tested, this code in Learner isn't tested as much. We 
> could build on the test case developed in ZOOKEEPER-2172 to make sure this 
> code works properly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to