Skip to content

MINOR: Do not print log4j for memberId required#9667

Merged
guozhangwang merged 2 commits into
apache:trunkfrom
guozhangwang:KMinor-do-not-print-for-memberID-required
Dec 4, 2020
Merged

MINOR: Do not print log4j for memberId required#9667
guozhangwang merged 2 commits into
apache:trunkfrom
guozhangwang:KMinor-do-not-print-for-memberID-required

Conversation

@guozhangwang

Copy link
Copy Markdown
Contributor

For MemberIdRequiredException, we would not print the exception at INFO with a full exception message since it may introduce more confusion that clearance.

Committer Checklist (excluded from commit message)

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

@guozhangwang

Copy link
Copy Markdown
Contributor Author

@hachikuji @abbccdda

@chia7712 chia7712 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.

@guozhangwang Nice improvement. It makes sense to me to eliminate this "error message" as it is NOT fatal.

final RuntimeException exception = future.exception();
log.info("Rebalance failed.", exception);

if (!(exception instanceof MemberIdRequiredException)) {

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.

Is JoinGroupResponseHandler a better place to log error? For example, the error UNKNOWN_MEMBER_ID is log twice.
(https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java#L605)

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.

For another, does it need some comment to explain why MemberIdRequiredException is excluded.

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.

I think I agree with you: it is a bit redundant. I think originally it is because this future may contain the error that is either from join-response or from sync-response, but at the moment both errors are logged inside the Join/SyncGroupHandler anyways. Just to maintain compatibility in case some trouble shooting scenarios are dependent on this summary entry for now.

@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.

Maybe add an explanation here for why to skip the member.id required exception? (as it's transient)

@guozhangwang

Copy link
Copy Markdown
Contributor Author

Maybe add an explanation here for why to skip the member.id required exception? (as it's transient)

Ack, will do.

@guozhangwang
guozhangwang merged commit a57486e into apache:trunk Dec 4, 2020
@guozhangwang
guozhangwang deleted the KMinor-do-not-print-for-memberID-required branch December 4, 2020 22:02
mimaison pushed a commit that referenced this pull request Dec 10, 2020
For MemberIdRequiredException, we would not print the exception at INFO with a full exception message since it may introduce more confusion that clearance.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Boyang Chen <boyang@confluent.io>
bbejeck pushed a commit that referenced this pull request Dec 10, 2020
For MemberIdRequiredException, we would not print the exception at INFO with a full exception message since it may introduce more confusion that clearance.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Boyang Chen <boyang@confluent.io>
@bbejeck

bbejeck commented Dec 10, 2020

Copy link
Copy Markdown
Member

cherry-picked to 2.7

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.

4 participants