-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Different Slice sizes on "put" operation and comparison #7863
Comments
I don't think it's expected, are you able to share the code to reproduce the issue? |
In my custom comparaotor:
Usage:
|
My guess is that sometimes you are being (erroneously) passed an InternalKey rather than a UserKey. Do you know what under which circumstances you get the larger key? Perhaps a stack trace/abort when you got a larger key might be helpful in debugging this. |
There was at least one bug where we passed internal keys to the user comparator. The one I remember was #4575. I'd suggest upgrading (preferably) or going through bug fixes in HISTORY.md to see if there's any other fixes that are needed to run 5.14 safely. |
Hello!
I put into my rocksdb::DB a key and value, each of which is an 8 byte rocksdb::Slice (the original data type is long long).
I also use my own comparator class, in which I check the sizes of the compared Slices. And from time to time I see that some slices are 16 bytes in size instead expected 8 bytes
Is this normal behavior or a bug?
I am using rocksdb 5.14.2 on Centos 6/7 and Debian 9+.
Almost identical code using leveldb did not have this behavior
Thanks
The text was updated successfully, but these errors were encountered: