[ https://issues.apache.org/jira/browse/ZOOKEEPER-1366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13194231#comment-13194231 ]
jirapos...@reviews.apache.org commented on ZOOKEEPER-1366: ---------------------------------------------------------- ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3648/ ----------------------------------------------------------- Review request for zookeeper. Summary ------- ZOOKEEPER-1366. Zookeeper should be tolerant of clock adjustments This addresses bug ZOOKEEPER-1366. https://issues.apache.org/jira/browse/ZOOKEEPER-1366 Diffs ----- src/java/main/org/apache/zookeeper/ClientCnxn.java 6c25e40 src/java/main/org/apache/zookeeper/ClientCnxnSocket.java 269f8e8 src/java/main/org/apache/zookeeper/Login.java 6d2a38c src/java/main/org/apache/zookeeper/Shell.java f2c899a src/java/main/org/apache/zookeeper/ZKUtil.java 4713a08 src/java/main/org/apache/zookeeper/common/Time.java PRE-CREATION src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java 9721f7c src/java/main/org/apache/zookeeper/server/Request.java c6a2249 src/java/main/org/apache/zookeeper/server/ServerStats.java acbc97c src/java/main/org/apache/zookeeper/server/SessionTrackerImpl.java cbae57a src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java 14f8c8f src/java/main/org/apache/zookeeper/server/quorum/AuthFastLeaderElection.java 8ba12c5 src/java/main/org/apache/zookeeper/server/quorum/FastLeaderElection.java 473d01e src/java/main/org/apache/zookeeper/server/quorum/Follower.java 29ef3f9 src/java/main/org/apache/zookeeper/server/quorum/Leader.java 27a5d20 src/java/systest/org/apache/zookeeper/test/system/GenerateLoad.java 57d0dcb src/java/systest/org/apache/zookeeper/test/system/InstanceManager.java 809fa48 src/java/systest/org/apache/zookeeper/test/system/SimpleSysTest.java 9cdf4d9 src/java/test/org/apache/zookeeper/common/TimeTest.java PRE-CREATION src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java c2cfd7a src/java/test/org/apache/zookeeper/test/ClientBase.java 02638a1 src/java/test/org/apache/zookeeper/test/ClientHammerTest.java b807dbb src/java/test/org/apache/zookeeper/test/CnxManagerTest.java fd59403 src/java/test/org/apache/zookeeper/test/LoadFromLogTest.java 8e0b0eb src/java/test/org/apache/zookeeper/test/ReadOnlyModeTest.java c705a7b src/java/test/org/apache/zookeeper/test/StaticHostProviderTest.java 1fed88a src/java/test/org/apache/zookeeper/test/TestHammer.java 09a678b src/java/test/org/apache/zookeeper/test/ZooKeeperTestClient.java cc82c87 src/recipes/queue/src/c/tests/Util.cc 26a9a09 Diff: https://reviews.apache.org/r/3648/diff Testing ------- Thanks, Benjamin > Zookeeper should be tolerant of clock adjustments > ------------------------------------------------- > > Key: ZOOKEEPER-1366 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1366 > Project: ZooKeeper > Issue Type: Bug > Reporter: Ted Dunning > Assignee: Ted Dunning > Fix For: 3.4.3 > > Attachments: ZOOKEEPER-1366-3.3.3.patch, ZOOKEEPER-1366.patch, > ZOOKEEPER-1366.patch, ZOOKEEPER-1366.patch, ZOOKEEPER-1366.patch > > > If you want to wreak havoc on a ZK based system just do [date -s "+1hour"] > and watch the mayhem as all sessions expire at once. > This shouldn't happen. Zookeeper could easily know handle elapsed times as > elapsed times rather than as differences between absolute times. The > absolute times are subject to adjustment when the clock is set while a timer > is not subject to this problem. In Java, System.currentTimeMillis() gives > you absolute time while System.nanoTime() gives you time based on a timer > from an arbitrary epoch. > I have done this and have been running tests now for some tens of minutes > with no failures. I will set up a test machine to redo the build again on > Ubuntu and post a patch here for discussion. -- 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