public void transitionToFatal() {
        MemberState previousState = state;
        transitionTo(MemberState.FATAL);
        if (memberId.isEmpty()) {
            log.error("Member {} with epoch {} transitioned to {} state", memberId, memberEpoch, MemberState.FATAL);
        } else {
            log.error("Non-member transitioned to {} state", MemberState.FATAL);
        }
        notifyEpochChange(Optional.empty(), Optional.empty());

        if (previousState == MemberState.UNSUBSCRIBED) {
            log.debug("Member {} with epoch {} got fatal error from the broker but it already " +
                    "left the group.", memberId, memberEpoch);
            return;
        }

        // Release assignment
        clearSubscription();
    }
Transition the member to the FAILED state and update the member info as required. This is
invoked when un-recoverable errors occur (ex. when the heartbeat returns a non-retriable
error)
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareMembershipManager.java