Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for (64-bit) unsigned keys/values. #120

Closed
jamadden opened this issue Feb 13, 2020 · 1 comment · Fixed by #122
Closed

Support for (64-bit) unsigned keys/values. #120

jamadden opened this issue Feb 13, 2020 · 1 comment · Fixed by #122
Assignees

Comments

@jamadden
Copy link
Member

RelStorage is using LLBTree internally to store some OIDs and transaction IDs. Those are defined as unsigned 64-bit integers, but LLBTree stores signed data. For very large or rapidly changing databases, eventually we'll need to store a value larger than 2^63-1, and then we'll get a ValueError.

So to avoid falling back to a regular dict, I need a BTree type that is either an unsigned 64-bit integer, or something larger (as in #100). I'd prefer unsigned integers because saving memory was one of the primary reasons for using LLBTree in the first place.

@freddrake
Copy link
Contributor

I think it would be fairly reasonable to add 64-bit unsigned long support, adding all or some of the variants UUBTree, ULBTree, UOBTree; I wouldn't imagine other combinations would actually be that useful.

Adding the L variants wasn't too painful, as best I recall (keeping in mind it was some time ago); it should be pretty clear how to do it if you can find the change(s) that introduced those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants