showuon commented on a change in pull request #10973:
URL: https://github.com/apache/kafka/pull/10973#discussion_r665176116
##########
File path:
clients/src/main/java/org/apache/kafka/clients/admin/internals/AlterConsumerGroupOffsetsHandler.java
##########
@@ -141,9 +147,16 @@ private void handleError(
failed.put(groupId, error.exception());
break;
case COORDINATOR_LOAD_IN_PROGRESS:
+ // If the coordinator is in the middle of loading, then we
just need to retry
+ log.debug("OffsetCommit request for group {} failed because
the coordinator" +
+ " is still in the process of loading state. Will retry.
Will retry", groupId);
+ break;
case COORDINATOR_NOT_AVAILABLE:
Review comment:
Yes, we'll retry when `COORDINATOR_NOT_AVAILABLE` error. And we already
log it below:
```
case COORDINATOR_NOT_AVAILABLE:
case NOT_COORDINATOR:
// If the coordinator is unavailable or there was a
coordinator change, then we unmap
// the key so that we retry the `FindCoordinator` request
log.debug("`{}` request for group {} returned error {}. " +
"Will attempt to find the coordinator again and retry.",
apiName(), groupId, error);
unmapped.add(groupId);
break;
```
We used a general way (with `error` variable), to log when either
`COORDINATOR_NOT_AVAILABLE` or `NOT_COORDINATOR` error happened.
I think it should be fine unless you have other suggestion. Thank you. :)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]