-
Notifications
You must be signed in to change notification settings - Fork 54
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
Update Cluster Bus Port out of range error message for Cluster Meet command #240
base: main
Are you sure you want to change the base?
Conversation
f838260
to
1cf1cef
Compare
…and (#1686) Now for the cluster meet command, we first check the port and cport number, and then the function clusterStartHandshake() is called. In the function clusterStartHandshake(), ip address is checked first and then port and cport range are checked. Even port or cport range is out of bound, only error message "Invalid node address specified" is reported. This is not correct. In this PR, I just make the port and cport check together before clusterStartHandshake() function. Thus the port number and range can be checked together. One example: Current behavior: 127.0.0.1:7000> cluster meet 10.21.96.98 65000 (error) ERR Invalid node address specified: 10.21.96.98:65000 127.0.0.1:7000> cluster meet 1928.2292.2983.3884.26622 6379 (error) ERR Invalid node address specified: 1928.2292.2983.3884.26622:6379 Whatever the wrong ip address or incorrect bus port number, user get the same error message. New behavior: 127.0.0.1:7000> cluster meet 10.21.96.98 65000 (error) ERR Cluster bus port number is out of range 127.0.0.1:7000> cluster meet 1928.2292.2983.3884.26622 6379 (error) ERR Invalid node address specified: 1928.2292.2983.3884.26622:6379 User can get much clearer error message. Related note pr: valkey-io/valkey-doc#240 --------- Signed-off-by: hwware <[email protected]> Signed-off-by: Wen Hui <[email protected]> Co-authored-by: Viktor Söderqvist <[email protected]>
resp2_replies.json
Outdated
@@ -259,7 +259,7 @@ | |||
"[Array reply](../topics/protocol.md#arrays): an array of maps where each map contains various attributes and their values of a cluster link." | |||
], | |||
"CLUSTER MEET": [ | |||
"[Simple string reply](../topics/protocol.md#simple-strings): `OK` if the command was successful. If the address or port specified are invalid an error is returned." | |||
"[Simple string reply](../topics/protocol.md#simple-strings): `OK` if the command was successful. If the port or cluster bus port number is out of range, an error is returned. If the ip address is invalid, Invalid node address message is returned." |
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.
"Invalid node address message" is an error too.
Do we need to specify document the exact error message here? I think we usually don't document it.
What do you think about this?
"[Simple string reply](../topics/protocol.md#simple-strings): `OK` if the command was successful. If the port or cluster bus port number is out of range, an error is returned. If the ip address is invalid, Invalid node address message is returned." | |
"[Simple string reply](../topics/protocol.md#simple-strings): `OK` if the command was successful. If the port or cluster bus port number is out of range, or if an invalid address is specified, an error is returned." |
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.
Address your comments in 2 files. Please take a look, Thanks
Signed-off-by: hwware <[email protected]>
Signed-off-by: hwware <[email protected]>
4485b7b
to
4d07e16
Compare
@@ -259,7 +259,7 @@ | |||
"[Array reply](../topics/protocol.md#arrays): an array of [Map reply](../topics/protocol.md#maps) where each map contains various attributes and their values of a cluster link." | |||
], | |||
"CLUSTER MEET": [ | |||
"[Simple string reply](../topics/protocol.md#simple-strings): `OK` if the command was successful. If the address or port specified are invalid an error is returned." | |||
"[Simple string reply](../topics/protocol.md#simple-strings): `OK` if the command was successful.If the port or cluster bus port number is out of range, or if an invalid address is specified, an error is returned." |
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 good, but a space was removed by mistake.
"[Simple string reply](../topics/protocol.md#simple-strings): `OK` if the command was successful.If the port or cluster bus port number is out of range, or if an invalid address is specified, an error is returned." | |
"[Simple string reply](../topics/protocol.md#simple-strings): `OK` if the command was successful. If the port or cluster bus port number is out of range, or if an invalid address is specified, an error is returned." |
This PR is related to PR valkey-io/valkey#1686