KAFKA-17908 Tweak log messages in group metadata manager (#17652)

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
Andrew Schofield 2024-11-03 22:16:56 +00:00 committed by GitHub
parent f7f4e5b5b1
commit 0707c1fde2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 9 deletions

View File

@ -1502,7 +1502,7 @@ public class GroupMetadataManager {
if (member.memberEpoch() != LEAVE_GROUP_STATIC_MEMBER_EPOCH) { if (member.memberEpoch() != LEAVE_GROUP_STATIC_MEMBER_EPOCH) {
// The new member can't join. // The new member can't join.
log.info("[GroupId {}] Static member {} with instance id {} cannot join the group because the instance id is" + log.info("[GroupId {}] Static member {} with instance id {} cannot join the group because the instance id is" +
" is owned by member {}.", groupId, receivedMemberId, receivedInstanceId, member.memberId()); " owned by member {}.", groupId, receivedMemberId, receivedInstanceId, member.memberId());
throw Errors.UNRELEASED_INSTANCE_ID.exception("Static member " + receivedMemberId + " with instance id " throw Errors.UNRELEASED_INSTANCE_ID.exception("Static member " + receivedMemberId + " with instance id "
+ receivedInstanceId + " cannot join the group because the instance id is owned by " + member.memberId() + " member."); + receivedInstanceId + " cannot join the group because the instance id is owned by " + member.memberId() + " member.");
} }
@ -2706,11 +2706,11 @@ public class GroupMetadataManager {
throwIfStaticMemberIsUnknown(member, instanceId); throwIfStaticMemberIsUnknown(member, instanceId);
throwIfInstanceIdIsFenced(member, groupId, memberId, instanceId); throwIfInstanceIdIsFenced(member, groupId, memberId, instanceId);
if (memberEpoch == LEAVE_GROUP_STATIC_MEMBER_EPOCH) { if (memberEpoch == LEAVE_GROUP_STATIC_MEMBER_EPOCH) {
log.info("[GroupId {}] Static Member {} with instance id {} temporarily left the consumer group.", log.info("[GroupId {}] Static member {} with instance id {} temporarily left the consumer group.",
group.groupId(), memberId, instanceId); group.groupId(), memberId, instanceId);
return consumerGroupStaticMemberGroupLeave(group, member); return consumerGroupStaticMemberGroupLeave(group, member);
} else { } else {
log.info("[GroupId {}] Static Member {} with instance id {} left the consumer group.", log.info("[GroupId {}] Static member {} with instance id {} left the consumer group.",
group.groupId(), memberId, instanceId); group.groupId(), memberId, instanceId);
return consumerGroupFenceMember(group, member, response); return consumerGroupFenceMember(group, member, response);
} }
@ -3029,7 +3029,7 @@ public class GroupMetadataManager {
sessionTimeoutMs, sessionTimeoutMs,
TimeUnit.MILLISECONDS, TimeUnit.MILLISECONDS,
true, true,
() -> consumerGroupFenceMemberOperation(groupId, memberId, "the member session expired.") () -> consumerGroupFenceMemberOperation(groupId, memberId, "the member session expired")
); );
} }
@ -3049,7 +3049,7 @@ public class GroupMetadataManager {
sessionTimeoutMs, sessionTimeoutMs,
TimeUnit.MILLISECONDS, TimeUnit.MILLISECONDS,
true, true,
() -> shareGroupFenceMemberOperation(groupId, memberId, "the member session expired.") () -> shareGroupFenceMemberOperation(groupId, memberId, "the member session expired")
); );
} }
@ -3139,7 +3139,7 @@ public class GroupMetadataManager {
rebalanceTimeoutMs, rebalanceTimeoutMs,
TimeUnit.MILLISECONDS, TimeUnit.MILLISECONDS,
true, true,
() -> consumerGroupFenceMemberOperation(groupId, memberId, "the classic member failed to join within the rebalance timeout.") () -> consumerGroupFenceMemberOperation(groupId, memberId, "the classic member failed to join within the rebalance timeout")
); );
} }
@ -3173,7 +3173,7 @@ public class GroupMetadataManager {
rebalanceTimeoutMs, rebalanceTimeoutMs,
TimeUnit.MILLISECONDS, TimeUnit.MILLISECONDS,
true, true,
() -> consumerGroupFenceMemberOperation(groupId, memberId, "the member failed to sync within timeout.") () -> consumerGroupFenceMemberOperation(groupId, memberId, "the member failed to sync within timeout")
); );
} }
@ -5739,7 +5739,7 @@ public class GroupMetadataManager {
member = group.getOrMaybeCreateMember(memberId, false); member = group.getOrMaybeCreateMember(memberId, false);
throwIfMemberDoesNotUseClassicProtocol(member); throwIfMemberDoesNotUseClassicProtocol(member);
log.info("[Group {}] Dynamic Member {} has left group " + log.info("[Group {}] Dynamic member {} has left group " +
"through explicit `LeaveGroup` request; client reason: {}", "through explicit `LeaveGroup` request; client reason: {}",
groupId, memberId, reason); groupId, memberId, reason);
} else { } else {
@ -5753,7 +5753,7 @@ public class GroupMetadataManager {
throwIfMemberDoesNotUseClassicProtocol(member); throwIfMemberDoesNotUseClassicProtocol(member);
memberId = member.memberId(); memberId = member.memberId();
log.info("[Group {}] Static Member {} with instance id {} has left group " + log.info("[Group {}] Static member {} with instance id {} has left group " +
"through explicit `LeaveGroup` request; client reason: {}", "through explicit `LeaveGroup` request; client reason: {}",
groupId, memberId, instanceId, reason); groupId, memberId, instanceId, reason);
} }