You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "showuon (via GitHub)" <gi...@apache.org> on 2023/08/11 08:05:47 UTC
[GitHub] [kafka] showuon opened a new pull request, #14192: MINOR: improve info log for memberIDRequired exception
showuon opened a new pull request, #14192:
URL: https://github.com/apache/kafka/pull/14192
Currently, when consumer startup, there will be a log message said:
```
[2023-08-11 15:47:17,713] INFO [Consumer clientId=console-consumer, groupId=console-consumer-28605] Request joining group due to: rebalance failed due to 'The group member needs to have a valid member id before actually entering a consumer group.' (MemberIdRequiredException) (org.apache.kafka.clients.consumer.internals.ConsumerCoordinator)
```
It confused users and make them think there's something wrong in the consumer application. Since `MemberIdRequiredException` is an expected transient exception, we could improve the log into a more informative way without exception words.
After change:
```
[2023-08-11 15:42:11,821] INFO [Consumer clientId=console-consumer, groupId=console-consumer-96226] Request joining group due to: The group member needs to have a valid member id before actually entering a consumer group.
```
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] showuon merged pull request #14192: MINOR: improve info log for memberIDRequired exception
Posted by "showuon (via GitHub)" <gi...@apache.org>.
showuon merged PR #14192:
URL: https://github.com/apache/kafka/pull/14192
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] tooptoop4 commented on pull request #14192: MINOR: improve info log for memberIDRequired exception
Posted by "tooptoop4 (via GitHub)" <gi...@apache.org>.
tooptoop4 commented on PR #14192:
URL: https://github.com/apache/kafka/pull/14192#issuecomment-1730273682
🦗
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac commented on a diff in pull request #14192: MINOR: improve info log for memberIDRequired exception
Posted by "dajac (via GitHub)" <gi...@apache.org>.
dajac commented on code in PR #14192:
URL: https://github.com/apache/kafka/pull/14192#discussion_r1309937908
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java:
##########
@@ -501,7 +501,10 @@ boolean joinGroupIfNeeded(final Timer timer) {
final String fullReason = String.format("rebalance failed due to '%s' (%s)",
exception.getMessage(),
simpleName);
- requestRejoin(shortReason, fullReason);
+ // Don't need to request rejoin again for MemberIdRequiredException since we've done that in JoinGroupResponseHandler
+ if (!MemberIdRequiredException.class.getSimpleName().equals(simpleName)) {
Review Comment:
Should we use `instanceof` here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] showuon commented on a diff in pull request #14192: MINOR: improve info log for memberIDRequired exception
Posted by "showuon (via GitHub)" <gi...@apache.org>.
showuon commented on code in PR #14192:
URL: https://github.com/apache/kafka/pull/14192#discussion_r1309953193
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java:
##########
@@ -501,7 +501,10 @@ boolean joinGroupIfNeeded(final Timer timer) {
final String fullReason = String.format("rebalance failed due to '%s' (%s)",
exception.getMessage(),
simpleName);
- requestRejoin(shortReason, fullReason);
+ // Don't need to request rejoin again for MemberIdRequiredException since we've done that in JoinGroupResponseHandler
+ if (!MemberIdRequiredException.class.getSimpleName().equals(simpleName)) {
Review Comment:
Ah, nice suggestion!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] showuon commented on pull request #14192: MINOR: improve info log for memberIDRequired exception
Posted by "showuon (via GitHub)" <gi...@apache.org>.
showuon commented on PR #14192:
URL: https://github.com/apache/kafka/pull/14192#issuecomment-1698755691
@dajac , could you help take a look for the small PR? Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] showuon commented on a diff in pull request #14192: MINOR: improve info log for memberIDRequired exception
Posted by "showuon (via GitHub)" <gi...@apache.org>.
showuon commented on code in PR #14192:
URL: https://github.com/apache/kafka/pull/14192#discussion_r1309965911
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java:
##########
@@ -501,7 +501,10 @@ boolean joinGroupIfNeeded(final Timer timer) {
final String fullReason = String.format("rebalance failed due to '%s' (%s)",
exception.getMessage(),
simpleName);
- requestRejoin(shortReason, fullReason);
+ // Don't need to request rejoin again for MemberIdRequiredException since we've done that in JoinGroupResponseHandler
+ if (!MemberIdRequiredException.class.getSimpleName().equals(simpleName)) {
Review Comment:
Updated. Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] showuon commented on pull request #14192: MINOR: improve info log for memberIDRequired exception
Posted by "showuon (via GitHub)" <gi...@apache.org>.
showuon commented on PR #14192:
URL: https://github.com/apache/kafka/pull/14192#issuecomment-1740385785
Failed tests are unrelated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org