[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flavio Junqueira updated ZOOKEEPER-790:
---------------------------------------

    Attachment: ZOOKEEPER-790.v2.patch

Thanks for providing a code base for the test, Sergey. I liked QuorumUtil so 
much that I have reimplemented the previous test to use it. This is in fact 
aligned with a discussion Ben and I had the other day about refactoring 
QuorumBase. You have introduced pretty much all functionality I was looking 
for, which simplified the test code. 

I hope you don't mind that I have made some modifications to your original 
test. My proposed modifications are to make sure that we induce the right set 
of events. In the modified version, I have made sure that we have a client 
connecting to a follower and that we kill the leader so that we force a new 
election. In fact, the test was not always reliable for me in its original form.

The patch works for me.

> Last processed zxid set prematurely while establishing leadership
> -----------------------------------------------------------------
>
>                 Key: ZOOKEEPER-790
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-790
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: quorum
>    Affects Versions: 3.3.1
>            Reporter: Flavio Junqueira
>            Assignee: Flavio Junqueira
>            Priority: Blocker
>             Fix For: 3.3.2, 3.4.0
>
>         Attachments: ZOOKEEPER-790-3.3.patch, ZOOKEEPER-790-3.3.patch, 
> ZOOKEEPER-790-follower-request-NPE.log, ZOOKEEPER-790-test.patch, 
> ZOOKEEPER-790.patch, ZOOKEEPER-790.patch, ZOOKEEPER-790.patch, 
> ZOOKEEPER-790.patch, ZOOKEEPER-790.patch, ZOOKEEPER-790.travis.log.bz2, 
> ZOOKEEPER-790.v2.patch, ZOOKEEPER-790.v2.patch
>
>
> The leader code is setting the last processed zxid to the first of the new 
> epoch even before connecting to a quorum of followers. Because the leader 
> code sets this value before connecting to a quorum of followers 
> (Leader.java:281) and the follower code throws an IOException 
> (Follower.java:73) if the leader epoch is smaller, we have that when the 
> false leader drops leadership and becomes a follower, it finds a smaller 
> epoch and kills itself.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to