MINOR: Avoid dividing by zero#7143
Conversation
| committed = taskManager.maybeCommitActiveTasksPerUserRequested(); | ||
| if (committed > 0) { | ||
| final long requestCommitLatency = advanceNowAndComputeLatency(); | ||
| commitSensor.record(requestCommitLatency / (double) committed, now); |
There was a problem hiding this comment.
The problem was here: committed could be zero without this fix.
There was a problem hiding this comment.
Seems like this should have noticeably screwed up these metrics, do we think this branch is just rarely seen or no one has noticed somehow?
There was a problem hiding this comment.
I think it's rarely executed. Only if a PAPI user request committing via context.commit(), what is expected to be rarely used feature.
|
Call for review @guozhangwang @bbejeck @vvcephei @ableegoldman @cadonna @abbccdda |
|
retest this please |
|
Java 11 / 2.13 and Java8 failed with know flaky tests (tracked in Jira). Java 11 / 2.12 passed. Retest this please. |
|
Java8 passed. Retest this please. |
|
Java 11 / 2.13 and Java 8 passed. Java 11 / 2.12 passed in a previous run. Merging. |
Reviews: A. Sophie Blee-Goldman <sophie@confluent.io>, Bill Bejeck <bill@confluent.io>, Bruno Cadonna <bruno@confluent.io>, Boyang Chen <boyang@confluent.io>, Guozhang Wang <guozhang@confluent.io>
|
Merged to |
Reviews: A. Sophie Blee-Goldman <sophie@confluent.io>, Bill Bejeck <bill@confluent.io>, Bruno Cadonna <bruno@confluent.io>, Boyang Chen <boyang@confluent.io>, Guozhang Wang <guozhang@confluent.io>
Reviews: A. Sophie Blee-Goldman <sophie@confluent.io>, Bill Bejeck <bill@confluent.io>, Bruno Cadonna <bruno@confluent.io>, Boyang Chen <boyang@confluent.io>, Guozhang Wang <guozhang@confluent.io>
* apache-github/2.3: MINOR: Avoid dividing by zero (apache#7143) KAFKA-8731: InMemorySessionStore throws NullPointerException on startup (apache#7132) KAFKA-8715; Fix buggy reliance on state timestamp in static member.id generation (apache#7116) KAFKA-8678; Fix leave group protocol bug in throttling and error response (apache#7101)
TICKET = LI_DESCRIPTION = EXIT_CRITERIA = HASH [7b52feb] ORIGINAL_DESCRIPTION = Reviews: A. Sophie Blee-Goldman <sophie@confluent.io>, Bill Bejeck <bill@confluent.io>, Bruno Cadonna <bruno@confluent.io>, Boyang Chen <boyang@confluent.io>, Guozhang Wang <guozhang@confluent.io> (cherry picked from commit 7b52feb)
IntelliJ showed a warning about it...
This affects
2.3,2.2, and2.1and we should backport the fix.