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

SCAN on redis cluster in Azure #1949

Open
taltal78 opened this issue Jan 27, 2025 · 0 comments
Open

SCAN on redis cluster in Azure #1949

taltal78 opened this issue Jan 27, 2025 · 0 comments

Comments

@taltal78
Copy link

taltal78 commented Jan 27, 2025

Hi,
related also to this: #1884

I have redis cluster with 1 master(2 slaves)
Calling scanStream in AWS to get all keys by patterna and delete them it works:

const node = redisClient.nodes('master')[0] 
const stream = node.scanStream({
....

redisClient.del(keys);
....

calling this with azure, i get " Cannot read properties of undefined (reading 'scanStream')" - so redisClient.nodes('master')[0] doesnt exist...
is there specific issue with cluster redis in Azure ?

it seems that this happens only sometimes, restart the app, and it successfully connects and found the master/slave nodes... sphoradic issue.
Can it be that after some time the cluster master nodes array somehow becomes empty?

P.s.1 will this return all found keys?
p.s2 on startup i go over all slaves and execute readOnly


   const slaves = client.nodes('slave');
    Promise.all(slaves.map((node) => {
        node.readonly();

thanks,
Tal

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

No branches or pull requests

1 participant