zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Han <h...@cloudera.com>
Subject Re: Is it good for Session management to use system time ?
Date Thu, 04 May 2017 15:57:57 GMT
Hi JiangJiafu:

>> Will this problem be fixed in 3.4.X??
According to ZOOKEEPER-1366 [1] the fix was not committed to 3.4 because
folks wanted to stabilize 3.4 and avoid big change but that concern is not
an issue anymore given 3.4 has been stable for quite sometime.

Are you interested in contributing the fix here? If so there is also a
patch attached in the JIRA targeted 3.4 that you can start work on. See [2]
on how to participate and contribute code.

[1] https://issues.apache.org/jira/browse/ZOOKEEPER-1366
[2] https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute


On Wed, May 3, 2017 at 11:34 PM, 蒋家福 <jiangjf@sugon.com> wrote:

> Michael Han:
>
>
> I'm using ZooKeeper 3.4.9 .
> Will this problem be fixed in 3.4.X??
>
>
> JiangJiafu
>
>
>
>
> ------------------ 原始邮件 ------------------
> 发件人: "Michael Han";<hanm@cloudera.com>;
> 发送时间: 2017年5月3日(星期三) 晚上11:50
> 收件人: "dev"<dev@zookeeper.apache.org>;
>
> 主题: Re: Is it good for Session management to use system time ?
>
>
>
> >> I think it may be better to use System.nanoTime() because it can achieve
> the same goal without any problem.
> Yes, and this has been fixed in ZOOKEEPER-1366 which is included in 3.5.1
> and later versions. Which version of ZK you are using?
>
> On Wed, May 3, 2017 at 1:09 AM, 蒋家福 <jiangjf@sugon.com> wrote:
>
> > Hi,
> >
> > I'm using ZooKeepr in a multi-node environment, I found that if the
> > machine time changes, the ephemeral node may exist for a long time even
> > that the client has disconnected with ZooKeeper server.
> > I read the source code and I find that the SessionTracker use
> > System.currentTimeMills() to record the time. I think it may be better to
> > use System.nanoTime() because it can achieve the same goal without any
> > problem.
> > I don't know whether I'm right. Can anyone give me suggestions?
> >
> >
> >
> > JiangJiafu
>
>
>
>
> --
> Cheers
> Michael.
>



-- 
Cheers
Michael.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message