dajac commented on code in PR #12910: URL: https://github.com/apache/kafka/pull/12910#discussion_r1033965897
########## core/src/main/scala/kafka/coordinator/group/GroupMetadata.scala: ########## @@ -546,9 +546,16 @@ private[group] class GroupMetadata(val groupId: String, initialState: GroupState def maybeInvokeJoinCallback(member: MemberMetadata, joinGroupResult: JoinGroupResult): Unit = { if (member.isAwaitingJoin) { - member.awaitingJoinCallback(joinGroupResult) - member.awaitingJoinCallback = null - numMembersAwaitingJoin -= 1 + try { + member.awaitingJoinCallback(joinGroupResult) + } catch { + case t: Throwable => + error(s"Failed to invoke join callback for $member due to ${t.getMessage}.") + member.awaitingJoinCallback(JoinGroupResult(member.memberId, Errors.UNKNOWN_SERVER_ERROR)) Review Comment: Yeah, I considered this. I tend to believe that errors on this path would be fatal errors anyway because they are/would be unexpected errors (likely due to bugs). UNKNOWN_SERVER_ERROR seems quite reasonable. -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org