hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandy Pratt <prat...@adobe.com>
Subject zxid integer overflow
Date Tue, 19 Oct 2010 18:33:05 GMT
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

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