Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed maxtid, copying value from ZEO.
Changed it to the value corresponding to the maximim *signed* big-endian 64-bit integer, because of LxBTrees. Note that this value isn't used anywhere in ZODB yet. Maybe it should be.
- Loading branch information
baee84a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am puzzled by the commit message:
Do LxBtrees care about TIDs ?
I can imagine them caring about OIDs (as they have to manipulate them for persistence), but I can't imagine a reason for them to care about transaction identifiers.
Also, is it really specific to L variant ? I thought L meant that keys could be just any long int (maybe signed, maybe not) fully controlled by btree user.
baee84a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LxBTrees use
Py_LongLong
(a signed type) for keys. One major use is for forward indexes, mapping integral document IDs to the values for the given document in that index. I can't think of any place off hand which uses TIDs as keys, but that doesn't mean @jimfulton doesn't have a usecase in mind.baee84a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
baee84a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand, I was only thinking about LxBTrees as they get stored inside a ZODB (ex: BTreeFolder2), and not as used in fsindex.
As for TID & OID being 64bits, I think there is too much code outside of ZODB which peeks at these values (actually mostly tids: Zope historian class, ...) to be able to change them. And I guess that 64 or 63 bits should be large enough anyway.
Yes, out of curiosity I did the check too. Moving from year 9000 to 5900 :).