Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added redis tag for redis key prefix to fix CROSSSLOT error in redis … #96

Open
wants to merge 1 commit into
base: v10
Choose a base branch
from

Conversation

arunsingh22
Copy link

…cluster.

Added curly braces around the key prefix name makes it a redis-tag. redis-tag ensures that all the keys starting with this prefix are mapped to the same keyslot when redis which will fix CROSSSLOT error in redis cluster.In single instance mode all keyslots are present in same shard hence CROSSSLOT error will not happen.

…cluster.

 Added curly braces around the key prefix name makes it a redis-tag.  redis-tag ensures that all the keys starting with this prefix are mapped to the same keyslot when redis which will fix CROSSSLOT error in redis cluster.In single instance mode all keyslots are present in same shard hence CROSSSLOT error will not happen.
@arunsingh22
Copy link
Author

Please review and close this PR asap. We are actually looking for this fix in the code because in a cluster env , if there is no redis -tag used then the keys get distributed among multiple shards which breaks the counting. This fix will ensure that all the keys are mapped to same shards even in cluster env.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant