[ZODB-Dev] BTrees and id mapping (was Re: Data.fs size grows non-stop)
Pedro Ferreira
jose.pedro.ferreira at cern.ch
Mon Dec 14 05:17:10 EST 2009
David Glick wrote:
> Pedro Ferreira wrote:
>
>> Hello all,
>>
>> So, I've been experimenting with a new structure for our date indexes,
>> and I was considering using an IOBTree that would map integer timestamps
>> to BTree-based sets. As for the sets, I considered two options:
>>
>>
> Be careful with using timestamps as IOBTree keys. By default this type
> of BTree uses the system integer, which on many systems is 32 bits.
> That means that you'll overflow the maximum allowed key for timestamps
> beyond the year 2038. It won't even give an error; it will just
> silently overflow and overwrite existing values in the BTree.
>
Yes, I know. That's one of the reasons I'm using YYYYmmdd integers
instead (the other one being i only need 1 day resolution).
Thanks a lot for the tip!
Pedro
More information about the ZODB-Dev
mailing list