-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Adds RESP3 to protocol specification #2120
Conversation
❌ Deploy Preview for redis-doc failed.
|
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.
LGTM with some minor edits
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.
Nice! If it takes a long time to handle all the review comments, I suggest merging it as is and handling the comments afterwards in a separate PR. Btw, I do agree with most of the comments. But this specification is missing since forever and it'd be better to have something in the meantime IMO.
@itamarhaber since this is an important change, mind resolving the conflicts and merging? We can take care of the feedback later, as suggested by @zuiderkwast. |
Co-authored-by: Nermina Miller <102551568+nermiller@users.noreply.github.com>
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.
@itamarhaber Ready to merge?
@zuiderkwast this isn't ready to merge, please wait. |
@leibale better?
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.
Just a few comments on the last commit about floats.
docs/reference/protocol-spec.md
Outdated
|
||
## Tips for Redis client authors | ||
|
||
* For testing purposes, use [Lua's type conversions](/topics/lua-api#lua-to-resp3-type-conversion) to have Redis reply with any RESP2/RESP3 needed. | ||
As an example, a RESP3 double can be generated like so: | ||
EVAL "return { double = 6.379e-5 }" 0 |
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.
@mgravell @zuiderkwast @leibale make this beefier if you can :)
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.
Interesting. I've never used this. It seems somehow more strait-forward to use ZADD k 6.379e-5 foo; ZSCORE k foo
to test doubles. The Lua way seems more complicated in the sense that it requires knowledge of how to return values from Lua (which is weird).
For this to be useful, perhaps include Lua examples for all types here?
Btw, the anchor link to the section within the page is lost due to redirects. The direct link nowdays seems to be https://redis.io/docs/manual/programmability/lua-api/#lua-to-resp3-type-conversion
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
@itamarhaber first time I've found that one set of conversions (
|
TBAH, same here 😆
This is a conscious decision made to minimize immediate script breakage.
I think this is the same thing, here's a comparison between old and new:
|
ah! confirmed, that works; however, it wasn't at all clear to me that |
Thanks to @jobol and @PerMildner for discussing this in redis#2203
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 have not read all the text but I think that the parts related to ASCII can be improved
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Fixes #1920