-
Notifications
You must be signed in to change notification settings - Fork 551
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 ROLE command #964
Adding ROLE command #964
Conversation
I don't think the unit test error is related to #961. It might be related to #925. The issue is that
One solution would be to add basic support for an array field in RespReadResponseUtils.cs line 192, something like this: else if (*ptr == ':')
{
if (!TryReadIntegerAsString(out result[i], ref ptr, end))
return false;
}
else if (*ptr == '*')
{
if (!TryReadStringArrayWithLengthHeader(out var subArray, ref ptr, end))
return false;
result[i] = string.Join(", ", subArray);
}
else
{
RespParsingException.ThrowUnexpectedToken(*ptr);
} |
Thanks. Added this to unblock review for now. Perhaps this should be fixed separately, if it is it would be easy to revert/force push/ to get that out from the PR. |
Feel free to split this change out to its own PR. It is not perfect, but we don't really plan to make GarnetClient perfect for all cases anyway. it just needs to handle these nestings gracefully. |
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.
Great work! Some minor comments
The new CLUSTER NODES test has an interesting Linux-only failure... CLUSTER NODES is unrelated to this PR, I think it should get its own? |
Yes, revert the change it is not related to this PR. If you would like to address the issue in a separate PR please go ahead. |
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 just noticed some more things. Please address.
An initial attempt to add the ROLE command + docs + tests. Likely this will need some revisions.
https://redis.io/docs/latest/commands/role/