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

Refactor SERedis.BaseSetAll to set all values at once #395

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

Conversation

FatemehFattahi
Copy link

Refactor SERedis.BaseSetAll to set all values at once

Copy link
Member

@catcherwong catcherwong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StackExchange.Redis.RedisCommandException : Multi-key operations must involve a single slot; keys can use 'hash tags' to help this, i.e. '{/users/12345}/account' and '{/users/12345}/contacts' will always be in the same slot

This change will trigger this exception when the redis server is in cluster mode, which requires great attention.

@MoienTajik
Copy link
Contributor

Does this exception happened in current unit-tests? How can we reproduce that?

@catcherwong
Copy link
Member

Yes.

  1. Running redis in cluster mode, https://redis.io/docs/manual/scaling/
  2. Modify the endpoints of redis in RedisCachingProviderTest.cs
  3. Run unit-tests of SetAll/SetAllAsync methods

@keshavkaul
Copy link

@catcherwong I get the above Multi Key error when I use GetByPrefix API. I'm using redis in cluster mode.

@keshavkaul
Copy link

keshavkaul commented Aug 18, 2023

@catcherwong Could you provide an alternative for GetByPrefix for redis in cluster mode?

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.

None yet

4 participants