dajac commented on code in PR #15215:
URL: https://github.com/apache/kafka/pull/15215#discussion_r1458965028


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImpl.java:
##########
@@ -1134,9 +1134,22 @@ private CompletableFuture<Void> assignPartitions(
         // Make assignment effective on the client by updating the 
subscription state.
         updateSubscription(assignedPartitions, false);
 
+        // Pause partitions to ensure that fetch does not start until the 
callback completes.
+        assignedPartitions.forEach(tp -> 
subscriptions.pause(tp.topicPartition()));

Review Comment:
   I don't have a strong opinion on the approach. 1. seems definitely cleaner 
but I don't know how hard it would be to do it. What I don't like about 2. is 
that `pause` is usually trigger by the user so, in theory, the user could 
unpause it instead of us. For the revocation, we added the `pendingRevocation` 
boolean to `TopicPartitionState`. An alternative to using `pause` would be to 
add another boolean.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to