squah-confluent commented on code in PR #21495:
URL: https://github.com/apache/kafka/pull/21495#discussion_r2822743919
##########
clients/clients-integration-tests/src/test/java/org/apache/kafka/clients/consumer/PlaintextConsumerSubscriptionTest.java:
##########
@@ -462,6 +462,92 @@ public void
testRe2JPatternSubscriptionAndTopicSubscription() throws Interrupted
}
+ /**
+ * Verifies that with async reconciliation, the assignment does not change
+ * in the background without a call to poll(). Validating fix in
KAFKA-20106.
+ *
+ * When a new topic matching the subscribed pattern is created, the
reconciliation may
+ * complete in the background, but the assignment should only be updated
on the next poll().
+ * Without the fix, this test will fail because the assignment will change
without polling.
+ *
+ * Note: For this bug to manifest, two conditions must be met:
+ * 1. Auto-commit must be disabled: if auto-commit is enabled the full
reconciliation
+ * that updates assignment is only triggered from consumer.poll
+ * 2. No ConsumerRebalanceListener callbacks - if callbacks are provided
they run within
+ * a call to consumer.poll, so the assignment update requires a call to
consumer.poll
+ */
+ @ClusterTest
+ public void testAsyncConsumerAssignmentDoesNotChangeWithoutPoll() throws
InterruptedException {
Review Comment:
There is `group.consumer.regex.refresh.interval.ms` which is 10 minutes but
the min interval is hardcoded to 10s in the code. The min interval doesn't look
configurable.
--
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]