-
Notifications
You must be signed in to change notification settings - Fork 543
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
Adding basic version of DUMP and RESTORE commands #899
base: main
Are you sure you want to change the base?
Adding basic version of DUMP and RESTORE commands #899
Conversation
@microsoft-github-policy-service agree |
f9c9838
to
2954d6e
Compare
/// <summary> | ||
/// Utils for working with redis length encoding | ||
/// </summary> | ||
public static class RedisLengthEncodingUtils |
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.
Rename redis -> resp, e.g., RespLengthEncodingUtils to clarify that this is related to the RESP protocol.
since you only ported the pycrc generated version, it seems we should be okay as it is ... |
/// </summary> | ||
/// <param name="data"></param> | ||
/// <returns></returns> | ||
public static byte[] Hash(ReadOnlySpan<byte> data) |
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.
Is there a reason for the custom CRC64 implementation? Have you tried using System.IO.Hashing.Crc64.Hash(data) instead?
@@ -90,6 +90,7 @@ public enum RespCommand : ushort | |||
ZSCAN, | |||
ZSCORE, // Note: Last read command should immediately precede FirstWriteCommand | |||
ZUNION, | |||
DUMP, |
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.
Please add a slot verification test for DUMP
E.g.:
new GET(), |
@@ -174,6 +175,7 @@ public enum RespCommand : ushort | |||
ZREMRANGEBYRANK, | |||
ZREMRANGEBYSCORE, | |||
ZUNIONSTORE, | |||
RESTORE, |
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.
Same as above add a slot verification test.
E.g.
new GET(), |
Currently only work's on string type and does not support compression, but it's still a solid starting point.
Implemented
Not Implemented
Also about the copyright for the crc64, i only ported the pycrc generated version, but still i'm not sure if and which copyright should i add.