You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "JiayaoS (via GitHub)" <gi...@apache.org> on 2026/09/17 07:56:32 UTC

[PR] KAFKA-21108: Speed up StreamsUpgradeTestIntegrationTest by explicitly leaving group on close [kafka]

JiayaoS opened a new pull request, #23492:
URL: https://github.com/apache/kafka/pull/23492

   The default policy of closing streams does not leave the group, causing each roll to wait for the session timeout ([45s](https://github.com/apache/kafka/blob/da078363444635eebe52cefc5a2c1baf11b8fbce/clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerConfig.java#L467)). Closing instances with `CloseOptions.groupMembershipOperation(LEAVE_GROUP)` instead explicitly removes them from the group, reducing test runtime from ~180s to ~9.7s.
   
   
   
   **Before:**
   ```xml
   <testcase name="testVersionProbingUpgrade()" classname="org.apache.kafka.streams.integration.StreamsUpgradeTestIntegrationTest" time="180.171"/>
   ```
   
   **After:**
   ```xml
   <testcase name="testVersionProbingUpgrade()" classname="org.apache.kafka.streams.integration.StreamsUpgradeTestIntegrationTest" time="9.769"/>
   ```
   
   


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-21108: Speed up StreamsUpgradeTestIntegrationTest by explicitly leaving group on close [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #23492:
URL: https://github.com/apache/kafka/pull/23492#discussion_r4040675753


##########
streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/StreamsUpgradeTestIntegrationTest.java:
##########
@@ -60,6 +61,7 @@ public static void closeCluster() {
 
     @Test
     public void testVersionProbingUpgrade() throws InterruptedException {
+        final CloseOptions leave = CloseOptions.groupMembershipOperation(LEAVE_GROUP);

Review Comment:
   @JiayaoS Would you mind adding a comment explaining why we don't use the default policy here? The default close() does not leave the group, so each roll would wait for the session timeout.



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-21108: Speed up StreamsUpgradeTestIntegrationTest by explicitly leaving group on close [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #23492:
URL: https://github.com/apache/kafka/pull/23492


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-21108: Speed up StreamsUpgradeTestIntegrationTest by explicitly leaving group on close [kafka]

Posted by "JiayaoS (via GitHub)" <gi...@apache.org>.
JiayaoS commented on code in PR #23492:
URL: https://github.com/apache/kafka/pull/23492#discussion_r4041206095


##########
streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/StreamsUpgradeTestIntegrationTest.java:
##########
@@ -60,6 +61,7 @@ public static void closeCluster() {
 
     @Test
     public void testVersionProbingUpgrade() throws InterruptedException {
+        final CloseOptions leave = CloseOptions.groupMembershipOperation(LEAVE_GROUP);

Review Comment:
   Thanks! Added the comment to explain why LEAVE_GROUP is used instead of the default close policy.



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org