mirror of
https://github.com/redis/redis.git
synced 2026-02-03 20:39:54 -05:00
Redis - Fix “ERR CLIENT CACHING YES” Error in Client Tracking BCAST Mode:
Update client command processing code to allow “CLIENT CACHING YES” in OPTIN OR BCAST mode. Bug: When using the redis client libraries such as rueidis and go-redis in Broadcast mode, the Redis server responds with the following error: “ERR CLIENT CACHING YES is only valid when tracking is enabled in OPTIN mode.” Redis and the client continue to work correctly and the client does not detect this error. However, the error count in INFO ERRORSTATS (server) increases. Fix: Update the redis Client Command processing code to allow “CLIENT CACHING YES” to be run in both “CLIENT TRACKING OPTIN” and “CLIENT TRACKING BCAST” mode. This change only alters the error reply behavior and not the client tracking logic, which was working as expected. Signed-off-by: Danno Tripp <danno.tripp@reddit.com>
This commit is contained in:
parent
b704179f15
commit
7aad17dd0d
1 changed files with 1 additions and 1 deletions
|
|
@ -3764,7 +3764,7 @@ NULL
|
|||
|
||||
char *opt = c->argv[2]->ptr;
|
||||
if (!strcasecmp(opt,"yes")) {
|
||||
if (c->flags & CLIENT_TRACKING_OPTIN) {
|
||||
if (c->flags & CLIENT_TRACKING_OPTIN || c->flags & CLIENT_TRACKING_BCAST) {
|
||||
c->flags |= CLIENT_TRACKING_CACHING;
|
||||
} else {
|
||||
addReplyError(c,"CLIENT CACHING YES is only valid when tracking is enabled in OPTIN mode.");
|
||||
|
|
|
|||
Loading…
Reference in a new issue