Remove nil/null reply description from ZADD command#2614
Remove nil/null reply description from ZADD command#2614moznion wants to merge 1 commit intoredis:masterfrom
Conversation
This command doesn't return nil/null reply even if the NX/XX/LT/GT options are conflict; in that case, it returns the error reply like the following: ``` zadd z XX NX 1 foo -ERR XX and NX options at the same time are not compatible zadd z NX GT 1 foo -ERR GT, LT, and/or NX options at the same time are not compatible zadd z LT GT 1 foo -ERR GT, LT, and/or NX options at the same time are not compatible ``` Signed-off-by: moznion <moznion@mail.moznion.net>
👷 Deploy request for redis-doc pending review.Visit the deploys page to approve it
|
zuiderkwast
left a comment
There was a problem hiding this comment.
Interesting. Can you find the PR where this was changed in redis?
|
You are right that an error is returned when the options conflict, but ZADD can still return null in some cases. See the test case "ZADD INCR LT/GT replies with nill if score not updated" in tests/unit/type/zset.tcl. I think we should change the description to something like "... if the score was not updated when INCR was combined with LT/GT options" similar to what is used in the test case. |
|
|
This command doesn't return nil/null reply even if the NX/XX/LT/GT options are conflict; in that case, it returns the error reply like the following: