You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Alexander Shraer (Created) (JIRA)" <ji...@apache.org> on 2011/11/02 23:35:32 UTC
[jira] [Created] (ZOOKEEPER-1282) Learner.java not following Zab
1.0 protocol - setCurrentEpoch should be done upon receipt of NEWLEADER
(before acking it) and not upon receipt of UPTODATE
Learner.java not following Zab 1.0 protocol - setCurrentEpoch should be done upon receipt of NEWLEADER (before acking it) and not upon receipt of UPTODATE
----------------------------------------------------------------------------------------------------------------------------------------------------------
Key: ZOOKEEPER-1282
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1282
Project: ZooKeeper
Issue Type: Bug
Components: server
Affects Versions: 3.4.0
Reporter: Alexander Shraer
according to https://cwiki.apache.org/confluence/display/ZOOKEEPER/Zab1.0
phase 2 part 2, "Once it receives NEWLEADER(e) it atomically applies
the new state and sets f.currentEpoch =e. "
In Learner.java self.setCurrentEpoch(newEpoch) is done after receiving
UPTODATE and not before acking the NEWLEADER message as should be.
case Leader.UPTODATE:
if (!snapshotTaken) {
zk.takeSnapshot();
}
self.cnxnFactory.setZooKeeperServer(zk);
break outerLoop;
case Leader.NEWLEADER: // it will be NEWLEADER in v1.0
zk.takeSnapshot();
snapshotTaken = true;
writePacket(new QuorumPacket(Leader.ACK,
newLeaderZxid, null, null), true);
break;
}
}
}
long newEpoch = ZxidUtils.getEpochFromZxid(newLeaderZxid);
self.setCurrentEpoch(newEpoch);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (ZOOKEEPER-1282) Learner.java not following Zab
1.0 protocol - setCurrentEpoch should be done upon receipt of NEWLEADER
(before acking it) and not upon receipt of UPTODATE
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144975#comment-13144975 ]
Hudson commented on ZOOKEEPER-1282:
-----------------------------------
Integrated in ZooKeeper-trunk #1357 (See [https://builds.apache.org/job/ZooKeeper-trunk/1357/])
ZOOKEEPER-1264. FollowerResyncConcurrencyTest failing intermittently.
ZOOKEEPER-1282. Learner.java not following Zab 1.0 protocol - setCurrentEpoch should be done upon receipt of NEWLEADER (before acking it) and not upon receipt of UPTODATE.
ZOOKEEPER-1291. AcceptedEpoch not updated at leader before it proposes the epoch to followers.
camille : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1198053
Files :
* /zookeeper/trunk/CHANGES.txt
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/Leader.java
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/Learner.java
* /zookeeper/trunk/src/java/test/org/apache/zookeeper/server/quorum/Zab1_0Test.java
* /zookeeper/trunk/src/java/test/org/apache/zookeeper/test/FollowerResyncConcurrencyTest.java
> Learner.java not following Zab 1.0 protocol - setCurrentEpoch should be done upon receipt of NEWLEADER (before acking it) and not upon receipt of UPTODATE
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-1282
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1282
> Project: ZooKeeper
> Issue Type: Sub-task
> Components: server
> Affects Versions: 3.4.0
> Reporter: Alexander Shraer
> Assignee: Benjamin Reed
> Fix For: 3.4.0, 3.5.0
>
>
> according to https://cwiki.apache.org/confluence/display/ZOOKEEPER/Zab1.0
> phase 2 part 2, "Once it receives NEWLEADER(e) it atomically applies
> the new state and sets f.currentEpoch =e. "
> In Learner.java self.setCurrentEpoch(newEpoch) is done after receiving
> UPTODATE and not before acking the NEWLEADER message as should be.
> case Leader.UPTODATE:
> if (!snapshotTaken) {
> zk.takeSnapshot();
> }
> self.cnxnFactory.setZooKeeperServer(zk);
> break outerLoop;
> case Leader.NEWLEADER: // it will be NEWLEADER in v1.0
> zk.takeSnapshot();
> snapshotTaken = true;
> writePacket(new QuorumPacket(Leader.ACK,
> newLeaderZxid, null, null), true);
> break;
> }
> }
> }
> long newEpoch = ZxidUtils.getEpochFromZxid(newLeaderZxid);
> self.setCurrentEpoch(newEpoch);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (ZOOKEEPER-1282) Learner.java not following Zab
1.0 protocol - setCurrentEpoch should be done upon receipt of NEWLEADER
(before acking it) and not upon receipt of UPTODATE
Posted by "Benjamin Reed (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13143692#comment-13143692 ]
Benjamin Reed commented on ZOOKEEPER-1282:
------------------------------------------
there is a test and a fix for this in ZOOKEEPER-1264
> Learner.java not following Zab 1.0 protocol - setCurrentEpoch should be done upon receipt of NEWLEADER (before acking it) and not upon receipt of UPTODATE
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-1282
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1282
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Alexander Shraer
>
> according to https://cwiki.apache.org/confluence/display/ZOOKEEPER/Zab1.0
> phase 2 part 2, "Once it receives NEWLEADER(e) it atomically applies
> the new state and sets f.currentEpoch =e. "
> In Learner.java self.setCurrentEpoch(newEpoch) is done after receiving
> UPTODATE and not before acking the NEWLEADER message as should be.
> case Leader.UPTODATE:
> if (!snapshotTaken) {
> zk.takeSnapshot();
> }
> self.cnxnFactory.setZooKeeperServer(zk);
> break outerLoop;
> case Leader.NEWLEADER: // it will be NEWLEADER in v1.0
> zk.takeSnapshot();
> snapshotTaken = true;
> writePacket(new QuorumPacket(Leader.ACK,
> newLeaderZxid, null, null), true);
> break;
> }
> }
> }
> long newEpoch = ZxidUtils.getEpochFromZxid(newLeaderZxid);
> self.setCurrentEpoch(newEpoch);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (ZOOKEEPER-1282) Learner.java not following Zab
1.0 protocol - setCurrentEpoch should be done upon receipt of NEWLEADER
(before acking it) and not upon receipt of UPTODATE
Posted by "Camille Fournier (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Camille Fournier resolved ZOOKEEPER-1282.
-----------------------------------------
Resolution: Fixed
Fix Version/s: 3.5.0
3.4.0
Release Note: Revision 1198053
> Learner.java not following Zab 1.0 protocol - setCurrentEpoch should be done upon receipt of NEWLEADER (before acking it) and not upon receipt of UPTODATE
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-1282
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1282
> Project: ZooKeeper
> Issue Type: Sub-task
> Components: server
> Affects Versions: 3.4.0
> Reporter: Alexander Shraer
> Assignee: Benjamin Reed
> Fix For: 3.4.0, 3.5.0
>
>
> according to https://cwiki.apache.org/confluence/display/ZOOKEEPER/Zab1.0
> phase 2 part 2, "Once it receives NEWLEADER(e) it atomically applies
> the new state and sets f.currentEpoch =e. "
> In Learner.java self.setCurrentEpoch(newEpoch) is done after receiving
> UPTODATE and not before acking the NEWLEADER message as should be.
> case Leader.UPTODATE:
> if (!snapshotTaken) {
> zk.takeSnapshot();
> }
> self.cnxnFactory.setZooKeeperServer(zk);
> break outerLoop;
> case Leader.NEWLEADER: // it will be NEWLEADER in v1.0
> zk.takeSnapshot();
> snapshotTaken = true;
> writePacket(new QuorumPacket(Leader.ACK,
> newLeaderZxid, null, null), true);
> break;
> }
> }
> }
> long newEpoch = ZxidUtils.getEpochFromZxid(newLeaderZxid);
> self.setCurrentEpoch(newEpoch);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (ZOOKEEPER-1282) Learner.java not following Zab
1.0 protocol - setCurrentEpoch should be done upon receipt of NEWLEADER
(before acking it) and not upon receipt of UPTODATE
Posted by "Camille Fournier (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Camille Fournier reassigned ZOOKEEPER-1282:
-------------------------------------------
Assignee: Benjamin Reed
> Learner.java not following Zab 1.0 protocol - setCurrentEpoch should be done upon receipt of NEWLEADER (before acking it) and not upon receipt of UPTODATE
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-1282
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1282
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Alexander Shraer
> Assignee: Benjamin Reed
>
> according to https://cwiki.apache.org/confluence/display/ZOOKEEPER/Zab1.0
> phase 2 part 2, "Once it receives NEWLEADER(e) it atomically applies
> the new state and sets f.currentEpoch =e. "
> In Learner.java self.setCurrentEpoch(newEpoch) is done after receiving
> UPTODATE and not before acking the NEWLEADER message as should be.
> case Leader.UPTODATE:
> if (!snapshotTaken) {
> zk.takeSnapshot();
> }
> self.cnxnFactory.setZooKeeperServer(zk);
> break outerLoop;
> case Leader.NEWLEADER: // it will be NEWLEADER in v1.0
> zk.takeSnapshot();
> snapshotTaken = true;
> writePacket(new QuorumPacket(Leader.ACK,
> newLeaderZxid, null, null), true);
> break;
> }
> }
> }
> long newEpoch = ZxidUtils.getEpochFromZxid(newLeaderZxid);
> self.setCurrentEpoch(newEpoch);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (ZOOKEEPER-1282) Learner.java not following Zab
1.0 protocol - setCurrentEpoch should be done upon receipt of NEWLEADER
(before acking it) and not upon receipt of UPTODATE
Posted by "Benjamin Reed (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13142638#comment-13142638 ]
Benjamin Reed commented on ZOOKEEPER-1282:
------------------------------------------
i can easily put a test and fix for this in once ZOOKEEPER-1264 goes in. (we need to move the self.setCurrentEpoch up to after the NEWLEADER. the check is easy to add in the unit test.)
> Learner.java not following Zab 1.0 protocol - setCurrentEpoch should be done upon receipt of NEWLEADER (before acking it) and not upon receipt of UPTODATE
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-1282
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1282
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.4.0
> Reporter: Alexander Shraer
>
> according to https://cwiki.apache.org/confluence/display/ZOOKEEPER/Zab1.0
> phase 2 part 2, "Once it receives NEWLEADER(e) it atomically applies
> the new state and sets f.currentEpoch =e. "
> In Learner.java self.setCurrentEpoch(newEpoch) is done after receiving
> UPTODATE and not before acking the NEWLEADER message as should be.
> case Leader.UPTODATE:
> if (!snapshotTaken) {
> zk.takeSnapshot();
> }
> self.cnxnFactory.setZooKeeperServer(zk);
> break outerLoop;
> case Leader.NEWLEADER: // it will be NEWLEADER in v1.0
> zk.takeSnapshot();
> snapshotTaken = true;
> writePacket(new QuorumPacket(Leader.ACK,
> newLeaderZxid, null, null), true);
> break;
> }
> }
> }
> long newEpoch = ZxidUtils.getEpochFromZxid(newLeaderZxid);
> self.setCurrentEpoch(newEpoch);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (ZOOKEEPER-1282) Learner.java not following Zab
1.0 protocol - setCurrentEpoch should be done upon receipt of NEWLEADER
(before acking it) and not upon receipt of UPTODATE
Posted by "Alexander Shraer (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Shraer updated ZOOKEEPER-1282:
----------------------------------------
Issue Type: Sub-task (was: Bug)
Parent: ZOOKEEPER-1264
> Learner.java not following Zab 1.0 protocol - setCurrentEpoch should be done upon receipt of NEWLEADER (before acking it) and not upon receipt of UPTODATE
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-1282
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1282
> Project: ZooKeeper
> Issue Type: Sub-task
> Components: server
> Affects Versions: 3.4.0
> Reporter: Alexander Shraer
> Assignee: Benjamin Reed
>
> according to https://cwiki.apache.org/confluence/display/ZOOKEEPER/Zab1.0
> phase 2 part 2, "Once it receives NEWLEADER(e) it atomically applies
> the new state and sets f.currentEpoch =e. "
> In Learner.java self.setCurrentEpoch(newEpoch) is done after receiving
> UPTODATE and not before acking the NEWLEADER message as should be.
> case Leader.UPTODATE:
> if (!snapshotTaken) {
> zk.takeSnapshot();
> }
> self.cnxnFactory.setZooKeeperServer(zk);
> break outerLoop;
> case Leader.NEWLEADER: // it will be NEWLEADER in v1.0
> zk.takeSnapshot();
> snapshotTaken = true;
> writePacket(new QuorumPacket(Leader.ACK,
> newLeaderZxid, null, null), true);
> break;
> }
> }
> }
> long newEpoch = ZxidUtils.getEpochFromZxid(newLeaderZxid);
> self.setCurrentEpoch(newEpoch);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira