Skip to content

getting MOVED errors on expire command #3044

@maa105

Description

@maa105

Description

we have 3 shards elasticache cluster (3 maters + a replica for each master). I occasionally/rarely getting MOVED errors on my expire commands. The cluster is stable and no slot redistribution is happening at all but yet I am getting this. I dug a bit into the code and I noticed you flag the expire command as readonly (see image below).

So my guess (still havent dug deeper into it). is it is routing the command to the correct shard but to the replica and getting a MOVED (since the replica probably cant update the expiry) and it then reforwards to the replica 16 times in a row exceeding the maxRedirection. And rarely cause it has to pick the replica 16 times in a row ie the probability is 1 in 2^16 or one in 65,000

The main question is why am I getting the MOVED error and how to resolve it

A side question would be why is expires marked as read only as it clearly updates the records metadata

Image

Node.js Version

20.18

Redis Server Version

8.1

Node Redis Version

5.7

Platform

linux

Logs

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions