Skip to content

DirectDruidClient: Fix division by zero.#4206

Merged
gianm merged 2 commits intoapache:masterfrom
gianm:fix-metrics
Apr 25, 2017
Merged

DirectDruidClient: Fix division by zero.#4206
gianm merged 2 commits intoapache:masterfrom
gianm:fix-metrics

Conversation

@gianm
Copy link
Copy Markdown
Contributor

@gianm gianm commented Apr 25, 2017

Introduced in #3954 when some floating math was changed to
integer math. This patch restores the old math.

Introduced in apache#3954 when some floating math was changed to
integer math. This patch restores the old math.
@gianm gianm added the Bug label Apr 25, 2017
@gianm gianm added this to the 0.10.1 milestone Apr 25, 2017
@dclim
Copy link
Copy Markdown
Contributor

dclim commented Apr 25, 2017

👍

Copy link
Copy Markdown
Contributor

@jihoonson jihoonson left a comment

Choose a reason for hiding this comment

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

Looks good to me, but it would be great if you add a comment for this problem.

TimeUnit.NANOSECONDS.toMillis(nodeTimeNs),
byteCount.get() / TimeUnit.NANOSECONDS.toSeconds(nodeTimeNs)
nodeTimeMs,
byteCount.get() / (0.001 * nodeTimeMs)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It would be better to leave a comment here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added a comment.

@jihoonson
Copy link
Copy Markdown
Contributor

LGTM!

@fjy fjy closed this Apr 25, 2017
@fjy fjy reopened this Apr 25, 2017
@gianm gianm merged commit 809112c into apache:master Apr 25, 2017
@gianm gianm deleted the fix-metrics branch April 25, 2017 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants