Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 61006 invoked from network); 19 Oct 2010 21:54:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Oct 2010 21:54:06 -0000 Received: (qmail 24433 invoked by uid 500); 19 Oct 2010 21:54:05 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 24411 invoked by uid 500); 19 Oct 2010 21:54:05 -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 24403 invoked by uid 99); 19 Oct 2010 21:54:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 21:54:05 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [216.145.54.172] (HELO mrout2.yahoo.com) (216.145.54.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Oct 2010 21:54:00 +0000 Received: from [10.73.135.250] (wifi-e-135-250.corp.yahoo.com [10.73.135.250]) by mrout2.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id o9JLrKvg074687 for ; Tue, 19 Oct 2010 14:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=yahoo-inc.com; s=cobra; t=1287525201; bh=pYqBcPNyDqIjwcAOZ+wbzvzXwXpwl9fh0d5DQ6YQNW4=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=n+Rp2RXGH/0D1+x/0S0in2Ta9RiJl79OG/xnCCCMpbavh0Ke4nMulvP4ERrRuaDS3 fwFCEhAOunB6P/zIKkbSzZg+Oj1WSGNbwd3mvfQ2zyL0B7tc+GAstuExu+0x6Btj8Z mcyurNgrNj4uma2FDcUpH7J/FwInXOIY0Pm70d1E= Message-ID: <4CBE1346.2080307@yahoo-inc.com> Date: Tue, 19 Oct 2010 14:53:10 -0700 From: Benjamin Reed User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100922 Thunderbird/3.1.4 MIME-Version: 1.0 To: zookeeper-user@hadoop.apache.org Subject: Re: zxid integer overflow References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit we should put in a test for that. it is certainly a plausible scenario. in theory it will just flow into the next epoch and everything will be fine, but we should try it and see. ben On 10/19/2010 11:33 AM, Sandy Pratt wrote: > Just as a thought experiment, I was pondering the following: > > ZK stamps each change to its managed state with a zxid (http://hadoop.apache.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 when the leader does, and the bottom 32 bits are a counter, which is incremented by the leader with every change. If 1000 changes are made to ZK state each second (which is 1/20th of the peak rate advertised), then the counter portion will roll over in 2^32 / (86400 * 1000) = 49 days. > > Now, assuming that my math is correct, is this an actual concern? For example, 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