Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # dev >> Review Request 15347: proposed solution for ZOOKEEPER-832

Copy link to this message
Re: Review Request 15347: proposed solution for ZOOKEEPER-832

This is an automatically generated e-mail. To reply, visit:

(Updated Nov. 8, 2013, 12:03 p.m.)
Review request for zookeeper.

formatting changes
Repository: zookeeper

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/

Full regresssion including new test.

German Blanco