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


##########
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:
   on KS I think we may not have this issue because we always use rebalance 
callbacks, right? (so assignment changes already only happen triggered from 
consumer poll, the one needed to trigger callbacks). wdyt?



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