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

bug: scan on listDocs is only performed against a single node, in clustered Redis #22

Closed
TillaTheHun0 opened this issue Dec 12, 2022 · 0 comments · Fixed by #27
Closed
Assignees
Labels
bug Something isn't working

Comments

@TillaTheHun0
Copy link
Member

TillaTheHun0 commented Dec 12, 2022

We use scan in listDocs. This works as is with a Non-clustered Redis, but with Clustered Redis, scan must be performed against each node in the cluster, thus requiring a map-reduce pattern to gather all matches, across nodes in the cluster.

See https://www.dontpanicblog.co.uk/2022/07/30/scan-a-redis-cluster/ for potential approaches.

Another approach is to use what is described in #17 to force all keys in a store to the same slot ie. the same node. Since all keys are prefixed with the hyper cache store name, we can hashtag the store name, forcing all keys in a store to the same hash slot.

Ergo, If we hashtag the store name, a scan on a single node will work in both clustered and non-clustered Redis.

@TillaTheHun0 TillaTheHun0 added the bug Something isn't working label Dec 12, 2022
TillaTheHun0 added a commit that referenced this issue Jun 5, 2023
… slot #22 #17

BREAKING CHANGE: all cache store keys that currently exist in a hyper cache
will MISS. The the values will need to be recomputed and then re-stored
in hyper cache
@TillaTheHun0 TillaTheHun0 self-assigned this Jun 5, 2023
TillaTheHun0 added a commit that referenced this issue Aug 18, 2023
… slot #22 #17

BREAKING CHANGE: all cache store keys that currently exist in a hyper cache
will MISS. The the values will need to be recomputed and then re-stored
in hyper cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
1 participant