How Do I Resolve the Error "CROSSSLOT Keys in request don't hash to the same slot"?
Scenarios
When multi-key commands are executed in a GeminiDB Redis instance, the error "CROSSSLOT Keys in request don't hash to the same slot" may be reported.
Error Cause
Commands involving multiple keys were executed across slots in a GeminiDB Redis cluster instance. For example, EVAL and BRPOPLPUSH were executed across slots.
Solution
- Change key names and use hashtags to ensure that the keys are in the same slot. Avoid data skew when you use hashtags. For more information, see Which Commands Require Hashtags on GeminiDB Redis Cluster Instances?
- When hashtags cannot be used, change the instance type to primary/standby. For details, see Compatible API and Versions.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot