Skip to content

MINOR: Avoid dividing by zero#7143

Merged
mjsax merged 1 commit into
apache:trunkfrom
mjsax:hotfix-divide-by-zero
Aug 3, 2019
Merged

MINOR: Avoid dividing by zero#7143
mjsax merged 1 commit into
apache:trunkfrom
mjsax:hotfix-divide-by-zero

Conversation

@mjsax

@mjsax mjsax commented Aug 1, 2019

Copy link
Copy Markdown
Member

IntelliJ showed a warning about it...

This affects 2.3, 2.2, and 2.1 and we should backport the fix.

@mjsax mjsax added the streams label Aug 1, 2019
committed = taskManager.maybeCommitActiveTasksPerUserRequested();
if (committed > 0) {
final long requestCommitLatency = advanceNowAndComputeLatency();
commitSensor.record(requestCommitLatency / (double) committed, now);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The problem was here: committed could be zero without this fix.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think it's rarely executed. Only if a PAPI user request committing via context.commit(), what is expected to be rarely used feature.

@mjsax

mjsax commented Aug 1, 2019

Copy link
Copy Markdown
Member Author

@abbccdda abbccdda left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

@cadonna cadonna left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you @mjsax!
LGTM

@bbejeck

bbejeck commented Aug 1, 2019

Copy link
Copy Markdown
Member

retest this please

@mjsax

mjsax commented Aug 1, 2019

Copy link
Copy Markdown
Member Author

Java 11 / 2.13 and Java8 failed with know flaky tests (tracked in Jira). Java 11 / 2.12 passed.

Retest this please.

@mjsax

mjsax commented Aug 2, 2019

Copy link
Copy Markdown
Member Author

Java8 passed.

Retest this please.

@mjsax

mjsax commented Aug 3, 2019

Copy link
Copy Markdown
Member Author

Java 11 / 2.13 and Java 8 passed.

Java 11 / 2.12 passed in a previous run. Merging.

@mjsax mjsax merged commit 320f7b0 into apache:trunk Aug 3, 2019
@mjsax mjsax deleted the hotfix-divide-by-zero branch August 3, 2019 21:03
mjsax added a commit that referenced this pull request Aug 3, 2019
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>
@mjsax

mjsax commented Aug 3, 2019

Copy link
Copy Markdown
Member Author

Merged to trunk and cherry-picked to 2.3, 2.2, and 2.1.

mjsax added a commit that referenced this pull request Aug 3, 2019
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>
mapr-devops pushed a commit to mapr/kafka that referenced this pull request Aug 4, 2019
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>
ijuma added a commit to confluentinc/kafka that referenced this pull request Aug 4, 2019
* 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)
xiowu0 pushed a commit to linkedin/kafka that referenced this pull request Aug 22, 2019
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)
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.

6 participants