zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "蒋家福" <jian...@sugon.com>
Subject 回复: Is it good for Session management to use system time ?
Date Thu, 04 May 2017 06:34:04 GMT
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.
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message