fix(cluster): prevent infinite loop by nkaradzhov · Pull Request #3078 · redis/node-redis

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@nkaradzhov

Copy link Copy Markdown

Collaborator

getRandomNode could end up in an infinite loop if
this.masters is empty and this.replicas is empty.

fixes: #3075

  • Is the new or changed code fully tested?
getRandomNode could end up in an infinite loop if
this.masters is empty and this.replicas is empty.

fixes: redis#3075

@nkaradzhov nkaradzhov merged commit 6eed1ee into redis:master

Sep 12, 2025

14 checks passed

@nkaradzhov nkaradzhov deleted the cluster-slots-fix branch

September 12, 2025 11:48

This was referenced

Nov 19, 2025

This was referenced

Feb 8, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@PavelPashov PavelPashov PavelPashov approved these changes

+1 more reviewer

@madhusudancs madhusudancs madhusudancs approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

CPU pegged while using createCluster() against AWS ElastiCache Valkey cluster

3 participants

@nkaradzhov @madhusudancs @PavelPashov