Repository navigation
Implement Support for Hello command - #42744
Conversation
Signed-off-by: dinesh-murugiah <[email protected]>
Signed-off-by: dinesh-murugiah <[email protected]>
Signed-off-by: dinesh-murugiah <[email protected]>
Signed-off-by: dinesh-murugiah <[email protected]>
Signed-off-by: dinesh-murugiah <[email protected]>
Signed-off-by: dinesh-murugiah <[email protected]>
Signed-off-by: dinesh-murugiah <[email protected]>
f64a1d5 to
4ca1bb3
Compare
Signed-off-by: dinesh-murugiah <[email protected]>
Signed-off-by: dinesh-murugiah <[email protected]>
| } | ||
|
|
||
| // If no array response found, forward first valid response | ||
| if (!found_first) { |
There was a problem hiding this comment.
can we instead check if (first_response_map.size() > 0) and get rid of found_first variable?
There was a problem hiding this comment.
sure will check
| sendSuccessResponse(request, std::move(response)); | ||
| } | ||
|
|
||
| void HelloResponseHandler::processAggregatedResponses(ClusterScopeCmdRequest& request) { |
There was a problem hiding this comment.
would be helpful to add explanatory comment to this method on how algorithm works. For now is not clear why do we need 2 passes across all responses, also there is some duplicated code.
There was a problem hiding this comment.
fixed
made it to ine pass to both feth the first reposnse and compare it with other responses
| // Additional options like AUTH, SETNAME are not supported yet | ||
| if (command_name == Common::Redis::SupportedCommands::hello()) { | ||
|
|
||
| if (request->asArray().size() > 2) { |
There was a problem hiding this comment.
and what if request->asArray().size() < 2 ? there is no handling for this case
There was a problem hiding this comment.
if its less than 2 , then its only hello command , which will be processed by the cluster scope handler, so not special handling requied
Signed-off-by: dinesh-murugiah <[email protected]>
|
/rerun |
|
i found an incompatibility. when lettuce client send "HELLO 3 AUTH user pass" . the return should be "ERR unknown command". but when hello is supported. the upper case is ignored, thus return "AuthRequired" #37706 |
|
@lyh802 thanks for pointing it out |
Signed-off-by: Gustavo <[email protected]>
Commit Message:
redis: implement HELLO command support for cluster-scope routing
Additional Description:
This PR implements support for the Redis HELLO command using the ClusterScopeCmdRequest framework. The HELLO command is essential for modern Redis clients like Lettuce, which require a HELLO response to establish connections and negotiate protocol versions. Without this support, such clients cannot communicate through the proxy.
The implementation:
This enables compatibility with clients that mandate HELLO handshake while maintaining the proxy's RESP2-only behavior.
Risk Level:
Medium
The change modifies command routing logic and adds a new cluster-scope command handler. While thoroughly tested, it affects the command processing path which is critical for all Redis operations.
Testing:
Docs Changes:
N/A
Release Notes:
redis: Added support for HELLO command to enable compatibility with modern Redis clients like Lettuce that require HELLO handshake. The proxy responds with RESP2 protocol information and rejects RESP3 protocol requests.
Platform Specific Features:
N/A