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
feat(server): Add support for PFADD and PFCOUNT #1152
Conversation
This version does not create sparse-encoded HLLs, however it is fully compatible with such ones created by Redis as it converts them to the dense encoding. Note that PFMERGE is not yet implemented. Signed-off-by: chakaz <chakaz@chakaz>
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.
Wow, super cool!
It's true that all HLLs created by Dragonfly should always be in the dense format, but in order to be compatible with Redis (like if Redis is the master) we need to support reading strings not crafted by Dragonfly which may use sparse encoding. |
You are right that it can happen during the rdb load or using the replication from Redis master.
|
I'm happy to add the rdb_test, but just making sure before: have you looked at the |
Signed-off-by: chakaz <chakaz@chakaz>
I guess rdb_test is not needed then. Yes, adding a dense string would suffice, thanks! |
Signed-off-by: chakaz <chakaz@chakaz>
Great, done! |
Signed-off-by: chakaz <chakaz@chakaz>
I switched to use PTAL. |
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.
Looks great!
This will allow dense-encoded HLL to *not* fit within the small string, which will make it contiguous in memory, thus GetSlice() will not allocate. Signed-off-by: chakaz <chakaz@chakaz>
This version does not create sparse-encoded HLLs, however it is fully compatible with such ones created by Redis as it converts them to the dense encoding.
#925