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


##########
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:
   Ok, I do agree on the drawbacks of the pause as it is exposed to the user. I 
will explore the alternative 1, having a specific state/boolean. My concern was 
messing too much with the existing subscription state + fetch + offsets but 
should be fine if I can end up with something isolated similar to the 
revocation one, that would only apply for the new consumer + new partitions 
while callback runs. 



-- 
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