mimaison commented on code in PR #12432:
URL: https://github.com/apache/kafka/pull/12432#discussion_r933414015
##########
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorCheckpointTask.java:
##########
@@ -306,7 +308,16 @@ Map<String, Map<TopicPartition, OffsetAndMetadata>>
syncGroupOffset() {
void syncGroupOffset(String consumerGroupId, Map<TopicPartition,
OffsetAndMetadata> offsetToSync) {
if (targetAdminClient != null) {
- targetAdminClient.alterConsumerGroupOffsets(consumerGroupId,
offsetToSync);
+ AlterConsumerGroupOffsetsResult result =
targetAdminClient.alterConsumerGroupOffsets(consumerGroupId, offsetToSync);
+ result.all().whenComplete((v, throwable) -> {
+ if (throwable != null) {
+ if (throwable.getCause() instanceof
UnknownMemberIdException) {
+ log.warn("Unable to sync offsets for consumer group
{}. This is likely caused by consumers currently using this group in the target
cluster.", consumerGroupId);
+ } else {
+ log.error("Unable to sync offsets for consumer group
{}.", consumerGroupId, throwable);
+ }
+ }
+ });
log.trace("sync-ed the offset for consumer group: {} with {}
number of offset entries",
Review Comment:
I've moved it in an `else` block above and tweaked the message slightly.
--
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]