public void onHeartbeatRequestSent() {
        MemberState state = state();
        if (state == MemberState.ACKNOWLEDGING) {
            if (targetAssignmentReconciled()) {
                transitionTo(MemberState.STABLE);
            } else {
                log.debug("Member {} with epoch {} transitioned to {} after a heartbeat was sent " +
                        "to ack a previous reconciliation. New assignments are ready to " +
                        "be reconciled.", memberId, memberEpoch, MemberState.RECONCILING);
                transitionTo(MemberState.RECONCILING);
            }
        } else if (state == MemberState.LEAVING) {
            if (isPollTimerExpired) {
                transitionToStale();
            } else {
                transitionToUnsubscribed();
            }
        }
    }
Update state when a heartbeat is sent out. This will transition out of the states that end
when a heartbeat request is sent, without waiting for a response (ex.
{@link MemberState#ACKNOWLEDGING} and {@link MemberState#LEAVING}).
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareMembershipManager.java