private void revokeAndAssign(SortedSet<TopicIdPartition> assignedTopicIdPartitions,
                                 SortedSet<TopicPartition> revokedPartitions) {
        if (!revokedPartitions.isEmpty()) {
            revokePartitions(revokedPartitions);
        }

        // Apply assignment
        if (!maybeAbortReconciliation()) {
            assignPartitions(assignedTopicIdPartitions);
        }

        // Make assignment effective on the broker by transitioning to send acknowledge.
        transitionTo(MemberState.ACKNOWLEDGING);
        markReconciliationCompleted();
    }
Complete the reconciliation by updating the assignment and making the appropriate state
transition.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareMembershipManager.java