envoyproxy / envoyproxy/envoy

redis: Send TRYAGAIN if key not found in MGET request

Open
#31,038 1 comment 0 reactions 0 assignees View on GitHub
area/redis enhancement help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 22h
Merged PRs (30d)
430

Description

*Title*: Send TRYAGAIN if key not found in MGET request

*Description*:

When an MGET request is issued, `redis_proxy` send `GET` request on each key and collects the response [here](https://github.com/envoyproxy/envoy/blob/main/source/extensions/filters/network/redis_proxy/command_splitter_impl.cc#L278-L310).

As per redis cluster spec [here](https://redis.io/commands/cluster-setslot/#:~:text=If%20the%20command,can%20be%20executed.) , if a hash slot is in migrating state and if any of the keys are not found, the response to the downstream client should be `TRYAGAIN`.

We run `redis_proxy` on server side, however it seems this part of the code is common if `redis_proxy` is executed on client or server side. In this case the redis server needs to respond with `TRYAGAIN` for the `MGET` request but today individual `GET` request prohibits this behavior.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.