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

checking that newNodes size is not 0 before passing it into random number generator #522

Merged
merged 15 commits into from
Sep 27, 2024

Conversation

JobseRyan
Copy link

@JobseRyan JobseRyan commented Sep 25, 2024

Inside of networkClient we're checking the size of our newNodes when we get the leastLoadedNode and passing that size into a random number generator. When the newNodes size is 0 the random number generator throws an exception which is blowing up our logs. Instead, this PR checks if the size is 0 and returns null which is consumed higher up as no valid node being found

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@JobseRyan JobseRyan changed the title checking that newNodes size is not 0 before passing it into random nu… checking that newNodes size is not 0 before passing it into random number generator Sep 25, 2024
Copy link

@sutambe sutambe left a comment

Choose a reason for hiding this comment

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

Thx for the patch.

@JobseRyan JobseRyan merged commit 1ae59d4 into 2.4-li Sep 27, 2024
21 checks passed
@JobseRyan JobseRyan deleted the user/rjobse/checkNodeSize branch September 27, 2024 16:37
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.

2 participants