lucasbru commented on code in PR #21495:
URL: https://github.com/apache/kafka/pull/21495#discussion_r2822482851


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractMembershipManager.java:
##########
@@ -817,11 +817,13 @@ private void transitionToStale() {
      *  - There are topics that haven't been added to the current assignment 
yet, but all their topic IDs
      *    are missing from the target assignment.
      *
-     * @param canCommit Controls whether reconciliation can proceed when 
auto-commit is enabled.
-     *                  Set to true only when the current offset positions are 
safe to commit.
-     *                  If false and auto-commit enabled, the reconciliation 
will be skipped.
+     * @param invokedByPoll True if this reconciliation attempt is triggered 
by the application thread on consumer.poll().
+     *                      False if this is triggered by the background 
thread on regular manager poll.
+     *                      In both cases we want to resolve metadata to 
unresolved assignments,
+     *                      but the actual reconciliation (commit, callbacks, 
assignment updates)
+     *                      will only proceed if this is triggered from the 
application thread on consumer.poll
      */
-    public void maybeReconcile(boolean canCommit) {
+    public void maybeReconcile(boolean invokedByPoll) {

Review Comment:
   Wait now that I am reading the current consumer code, I am not sure I 
understand this PR fully. In Consumer.poll, we don't seem to be waiting for the 
AsyncPollEvent to finish, so in the end, we are still updating the 
`maybeReconcile(true)` outside of `Consumer.poll` right?



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