views:

362

answers:

3

I have implemented a queue on top of TC (Tokyo Tyrant to be specific). I am using memcache compatible function increment to keep track of queue head and tail. I just want to know what is the limit for the integers stored (64 bit?) by TC and what happens when increment function is called after the number stored is at maximum value allowed? Does it starts again from 1 or does it raise error?

+4  A: 

Just got back a reply from Mikio (creator of TC).

Yes. 2^63 is the upper limit. It will start again from 0.

Paras Chopra
A: 

Why does it matter, theres no way in hell you will be able to ever reach 2^64 if you start counting from 1.

mP
A: 

If you are building for a 32-bit system, you need to enable 64-bit offsets to be able to pass the otherwise 2 GB limit.

e.g.

./configure --enable-off64
rsms