Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 650D9200C87 for ; Wed, 17 May 2017 14:29:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 639F2160BCB; Wed, 17 May 2017 12:29:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A649B160BB5 for ; Wed, 17 May 2017 14:29:07 +0200 (CEST) Received: (qmail 18434 invoked by uid 500); 17 May 2017 12:29:06 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 18417 invoked by uid 99); 17 May 2017 12:29:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 May 2017 12:29:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 5139F185F86 for ; Wed, 17 May 2017 12:29:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id lBO6URP-Y8wq for ; Wed, 17 May 2017 12:29:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 1E5E25FE3E for ; Wed, 17 May 2017 12:29:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 985A6E0BCA for ; Wed, 17 May 2017 12:29:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 42F1D263A7 for ; Wed, 17 May 2017 12:29:04 +0000 (UTC) Date: Wed, 17 May 2017 12:29:04 +0000 (UTC) From: "Hadoop QA (JIRA)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ZOOKEEPER-2774) Ephemeral znode will not be removed when sesstion timeout, if the system time of ZooKeeper node changes unexpectedly. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 17 May 2017 12:29:08 -0000 [ https://issues.apache.org/jira/browse/ZOOKEEPER-2774?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D= 16013936#comment-16013936 ]=20 Hadoop QA commented on ZOOKEEPER-2774: -------------------------------------- -1 overall. GitHub Pull Request Build =20 +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 34 new or modified tes= ts. -1 javadoc. The javadoc tool appears to have generated 1 warning messa= ges. +1 javac. The applied patch does not increase the total number of java= c compiler warnings. -1 findbugs. The patch appears to introduce 90 new Findbugs (version 3= .0.1) warnings. +1 release audit. The applied patch does not increase the total number= of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr-b= uild/697//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github= -pr-build/697//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.= html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-github-pr= -build/697//console This message is automatically generated. > Ephemeral znode will not be removed when sesstion timeout, if the system = time of ZooKeeper node changes unexpectedly. > -------------------------------------------------------------------------= -------------------------------------------- > > Key: ZOOKEEPER-2774 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2774 > Project: ZooKeeper > Issue Type: Bug > Components: server > Affects Versions: 3.4.8, 3.4.9, 3.4.10 > Environment: Centos6.5 > Reporter: JiangJiafu > > 1. Deploy a ZooKeeper cluster with one node. > 2. Create a Ephemeral znode. > 3. Change the system time of the ZooKeeper node to a earlier point. > 4. Disconnect the client with the ZooKeeper server. > Then the ephemeral znode will exist for a long time even when session tim= eout. > I have read the ZooKeeper source code and I find the code int SessionTrac= kerImpl.java=EF=BC=8C > {code:title=3DSessionTrackerImpl.java|borderStyle=3Dsolid} > @Override > synchronized public void run() { > try { > while (running) { > currentTime =3D System.currentTimeMillis(); > if (nextExpirationTime > currentTime) { > this.wait(nextExpirationTime - currentTime); > continue; > } > SessionSet set; > set =3D sessionSets.remove(nextExpirationTime); > if (set !=3D null) { > for (SessionImpl s : set.sessions) { > setSessionClosing(s.sessionId); > expirer.expire(s); > } > } > nextExpirationTime +=3D expirationInterval; > } > } catch (InterruptedException e) { > handleException(this.getName(), e); > } > LOG.info("SessionTrackerImpl exited loop!"); > } > {code} > I think it may be better to use System.nanoTime(), not System.currentTime= Millis, because the later can be changed manually or automatically by a NTP= client.=20 -- This message was sent by Atlassian JIRA (v6.3.15#6346)