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 DE44A200C7C for ; Mon, 5 Jun 2017 12:47:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DD245160BD4; Mon, 5 Jun 2017 10:47:22 +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 274D0160BBF for ; Mon, 5 Jun 2017 12:47:22 +0200 (CEST) Received: (qmail 17937 invoked by uid 500); 5 Jun 2017 10:47:21 -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 17926 invoked by uid 99); 5 Jun 2017 10:47:21 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jun 2017 10:47:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DE3CEDFBC6; Mon, 5 Jun 2017 10:47:20 +0000 (UTC) From: maoling To: dev@zookeeper.apache.org Reply-To: dev@zookeeper.apache.org References: In-Reply-To: Subject: [GitHub] zookeeper issue #262: ZOOKEEPER-2789: Reassign `ZXID` for solving 32bit over... Content-Type: text/plain Message-Id: <20170605104720.DE3CEDFBC6@git1-us-west.apache.org> Date: Mon, 5 Jun 2017 10:47:20 +0000 (UTC) archived-at: Mon, 05 Jun 2017 10:47:23 -0000 Github user maoling commented on the issue: https://github.com/apache/zookeeper/pull/262 Hi, @asdf2014 .Thanks for your explanation! But I still have some confusions about the question one: look at code like this : ``` int epoch = (int)Long.rotateRight(zxid, 32);// >> 32; long count = zxid & 0xffffffffffL; ``` it all depends on that **zxid** can not be altered(no write operation when **zxid** has generated at the first time) in the multithread situation,otherwise epoch and count isn't idempotent.should **zxid** be decorated by **final**? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---