You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by German Blanco <ge...@gmail.com> on 2013/11/08 12:57:46 UTC

Review Request 15347: proposed solution for ZOOKEEPER-832

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15347/
-----------------------------------------------------------

Review request for zookeeper.


Bugs: ZOOKEEPER-832
    https://issues.apache.org/jira/browse/ZOOKEEPER-832


Repository: zookeeper


Description
-------

This patch addresses ZOOKEEPER-832.
The problem is that if a client has seen a higher zxid than the server, there is an infinite loop.
The solution is to close the session if the server is a standalone, read-only or leader. This is because standalone and leader have seen all transactions, so the session is in error; and the read-only server has no possibility to reach a higher zxid, so it is better to clean the session and allow the client to connect.
A learner server keeps the current behaviour (connection is rejected so that the client may try another server).


Diffs
-----

  ./src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java 1532621 
  ./src/java/test/org/apache/zookeeper/test/SessionZxidValidationTest.java PRE-CREATION 

Diff: https://reviews.apache.org/r/15347/diff/


Testing
-------

Full regresssion including new test.


Thanks,

German Blanco


Re: Review Request 15347: proposed solution for ZOOKEEPER-832

Posted by German Blanco <ge...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15347/
-----------------------------------------------------------

(Updated Nov. 8, 2013, 12:03 p.m.)


Review request for zookeeper.


Changes
-------

formatting changes


Bugs: ZOOKEEPER-832
    https://issues.apache.org/jira/browse/ZOOKEEPER-832


Repository: zookeeper


Description
-------

This patch addresses ZOOKEEPER-832.
The problem is that if a client has seen a higher zxid than the server, there is an infinite loop.
The solution is to close the session if the server is a standalone, read-only or leader. This is because standalone and leader have seen all transactions, so the session is in error; and the read-only server has no possibility to reach a higher zxid, so it is better to clean the session and allow the client to connect.
A learner server keeps the current behaviour (connection is rejected so that the client may try another server).


Diffs (updated)
-----

  ./src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java 1532621 
  ./src/java/test/org/apache/zookeeper/test/SessionZxidValidationTest.java PRE-CREATION 

Diff: https://reviews.apache.org/r/15347/diff/


Testing
-------

Full regresssion including new test.


Thanks,

German Blanco