RedisLabs / redis-cluster-proxy

A proxy for Redis clusters.
GNU Affero General Public License v3.0
993 stars 132 forks source link

some issues with parent request might lead client blocked #63

Open HuangZhenLiang opened 4 years ago

HuangZhenLiang commented 4 years ago

Proxy will create child requests for some commands. For now, there might be some issues in processing request with child requests.

1, If error occurs while sending request to cluster node or receiving response from cluster node, request will be freed and an error msg will append to client buf. This is ok for request without child requests, but not for those parent requests. If a parent request is being freed, all the child request will being freed also. Client will loss some response, and min_reply_id will never being set to req->max_child_reply_id + 1. No matter what command client sent lately, it will not getting any response.

2, Proxy will reprocess requests when getting "MOVED" reply. It is not ok to reprocess request with command handleReply and not key command. It will do duplicateRequestForAllMasters again for every parent and child requests.