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

Thawan Kooburat commented on ZOOKEEPER-1551:
--------------------------------------------

This is to make ZOOKEEPER-1552 works correctly.  Previously, Observer only 
create a snapshot after sync-up and never write to disk at all. 

We need to log INFORM packets, which come after the snapshot is taken, to disk 
like the followers. So that on the next restart, these txns won't be missing 
(if the observer is restarted before the next snapshot)  

The patch has 5 lines commented in the unit test (Since it requires 
ZOOKEEPER-1552) which will cover this case. 
                
> Observer ignore txns that comes after snapshot and UPTODATE 
> ------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1551
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1551
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.4.3
>            Reporter: Thawan Kooburat
>            Assignee: Thawan Kooburat
>            Priority: Critical
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1551.patch
>
>
> In Learner.java, txns which comes after the learner has taken the snapshot 
> (after NEWLEADER packet) are stored in packetsNotCommitted. The follower has 
> special logic to apply these txns at the end of syncWithLeader() method. 
> However, the observer will ignore these txns completely, causing data 
> inconsistency. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to