Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 73709 invoked from network); 19 Oct 2010 18:33:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Oct 2010 18:33:39 -0000 Received: (qmail 48272 invoked by uid 500); 19 Oct 2010 18:33:39 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 48249 invoked by uid 500); 19 Oct 2010 18:33:39 -0000 Mailing-List: contact zookeeper-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zookeeper-user@hadoop.apache.org Delivered-To: mailing list zookeeper-user@hadoop.apache.org Received: (qmail 48241 invoked by uid 99); 19 Oct 2010 18:33:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 18:33:39 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of prattrs@adobe.com designates 64.18.1.29 as permitted sender) Received: from [64.18.1.29] (HELO exprod6og112.obsmtp.com) (64.18.1.29) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 18:33:29 +0000 Received: from source ([192.150.11.134]) by exprod6ob112.postini.com ([64.18.5.12]) with SMTP ID DSNKTL3kY07r1XiAx47VvizZEKQJFtS+ca+T@postini.com; Tue, 19 Oct 2010 11:33:08 PDT Received: from inner-relay-1.corp.adobe.com ([153.32.1.51]) by outbound-smtp-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id o9JIWuqk021696 for ; Tue, 19 Oct 2010 11:32:56 -0700 (PDT) Received: from nacas02.corp.adobe.com (nacas02.corp.adobe.com [10.8.189.100]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id o9JIX6tm028770 for ; Tue, 19 Oct 2010 11:33:06 -0700 (PDT) Received: from NAMBX01.corp.adobe.com ([10.8.189.91]) by nacas02.corp.adobe.com ([10.8.189.100]) with mapi; Tue, 19 Oct 2010 11:33:06 -0700 From: Sandy Pratt To: "'zookeeper-user@hadoop.apache.org'" Date: Tue, 19 Oct 2010 11:33:05 -0700 Subject: zxid integer overflow Thread-Topic: zxid integer overflow Thread-Index: Actvu8nW8J3c1ic4STSlDCcbGBVIBw== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_A0B699C30D50C84883E79752AEA74B881D74C6C761NAMBX01corpad_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_A0B699C30D50C84883E79752AEA74B881D74C6C761NAMBX01corpad_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Just as a thought experiment, I was pondering the following: ZK stamps each change to its managed state with a zxid (http://hadoop.apach= e.org/zookeeper/docs/r3.2.1/zookeeperInternals.html). That ID consists of = a 64 bit number in which the upper 32 bits are the epoch, which changes whe= n the leader does, and the bottom 32 bits are a counter, which is increment= ed by the leader with every change. If 1000 changes are made to ZK state e= ach second (which is 1/20th of the peak rate advertised), then the counter = portion will roll over in 2^32 / (86400 * 1000) =3D 49 days. Now, assuming that my math is correct, is this an actual concern? For exam= ple, if I'm using ZK to provide locking for a key value store that handles = transactions at about that rate, am I setting myself up for failure? Thanks, Sandy --_000_A0B699C30D50C84883E79752AEA74B881D74C6C761NAMBX01corpad_--