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

Avoid zero division error when there are no available nodes #2482

Merged
merged 1 commit into from
Jul 9, 2019

Conversation

ganmacs
Copy link
Member

@ganmacs ganmacs commented Jul 9, 2019

Which issue(s) this PR fixes:
no

What this PR does / why we need it:

I added checking of the size of regular_nodes to avoid to raise ZeroDivisionError when there are no available nodes.

coe = (regular_nodes.size * 6) / weight_array.size

Docs Changes:

No need

Release Note:

No need

@ganmacs ganmacs requested a review from repeatedly July 9, 2019 03:26
@ganmacs ganmacs self-assigned this Jul 9, 2019
@ganmacs ganmacs added the bug Something isn't working label Jul 9, 2019
@repeatedly repeatedly merged commit ae1c155 into fluent:master Jul 9, 2019
@repeatedly
Copy link
Member

Good catch!

@ganmacs ganmacs deleted the avoid-zero-div-error branch July 9, 2019 05:00
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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants