CROSSSLOT: CROSSSLOT Keys in request don't hash to the same slot
RedisWhat does it mean?
In Redis Cluster, a multi-key command (e.g. MGET, MSET, SUNION) was used, but the keys fall into different hash slots. Multi-key operations require all keys to be in the same slot.
Why does it happen?
In cluster mode, commands accessing several keys at once are called with keys spread across different slots. Keys are distributed to different nodes because they do not use a hash tag.
How to fix it
Use a hash tag to put related keys in the same slot: pin part of the key name with curly braces (e.g. {user1}:profile and {user1}:settings go to the same slot). Use multi-key commands only with keys sharing the same hash tag. Alternatively, split operations into single-key commands.
More from this engine
- LOADINGLOADING Redis is loading the dataset in memory
- BUSYBUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE
- MISCONFMISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk
- MOVEDMOVED slot ip:port (cluster redirect)
- ASKASK slot ip:port (cluster redirect)
- NOSCRIPTNOSCRIPT No matching script. Please use EVAL
- EXECABORTEXECABORT Transaction discarded because of previous errors