You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "chickenchickenlove (via GitHub)" <gi...@apache.org> on 2026/10/05 12:55:23 UTC

[PR] KAFKA-21219: Fix Streams group close stall with REMAIN_IN_GROUP after poll timeout [kafka]

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

   `StreamsMembershipManager.isLeavingGroup()` returned `false` for dynamic members closing with `REMAIN_IN_GROUP`, even while they were in `LEAVING`. If the poll timer had expired, the heartbeat manager initiated another leave operation, triggering an invalid `LEAVING → PREPARE_LEAVING` transition and leaving the close future incomplete.
   
   This change makes `isLeavingGroup()` reflect the membership state independently of the leave heartbeat policy. Regression tests verify that closing completes without a leave heartbeat after poll timeout and that regular heartbeats remain possible during `PREPARE_LEAVING`.


-- 
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-21219: Fix Streams group close stall with REMAIN_IN_GROUP after poll timeout [kafka]

Posted by "chickenchickenlove (via GitHub)" <gi...@apache.org>.
chickenchickenlove commented on PR #23712:
URL: https://github.com/apache/kafka/pull/23712#issuecomment-6013979121

   @lucasbru @m1a2st 
   Sorry for pinging you out of the blue!
   There seems to be a major (maybe?) bug involving `REMAIN_GROUP` and `dynamic members` under the Streams protocol.
   
   When you have bandwidth, could you take a look?
   (Also, this PR will be aligned with #23714 for the consumer group. cc. @lianetm)


-- 
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-21219: Fix Streams group close stall with REMAIN_IN_GROUP after poll timeout [kafka]

Posted by "lianetm (via GitHub)" <gi...@apache.org>.
lianetm commented on PR #23712:
URL: https://github.com/apache/kafka/pull/23712#issuecomment-6019340157

   Just thoughts about the impact:
   - on the consumer side could end up with a close hanging, but only if someone is explicitely passing the remain option (which we discovered that hasn't been working as expected since introduced in 4.1/4.2), so surely not widespread (so fair bug but not high impact), will fix for 4.5
   - on KS, not sure about how bad this : if KS is using the remain internally then we probably have more chances of hitting this (if that close+remain races with an expired poll timer). 
   
   I'll continue reviewing the consumer side.  Thanks!


-- 
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-21219: Fix Streams group close stall with REMAIN_IN_GROUP after poll timeout [kafka]

Posted by "chickenchickenlove (via GitHub)" <gi...@apache.org>.
chickenchickenlove commented on PR #23712:
URL: https://github.com/apache/kafka/pull/23712#issuecomment-6038845716

   If there are any changes following the review with @lianetm , 
   I'll let you know here as well so that we can discuss them!


-- 
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-21219: Fix Streams group close stall with REMAIN_IN_GROUP after poll timeout [kafka]

Posted by "chickenchickenlove (via GitHub)" <gi...@apache.org>.
chickenchickenlove commented on PR #23712:
URL: https://github.com/apache/kafka/pull/23712#issuecomment-6026626104

   Thanks for clarifying! Agreed that this is not a release blocker. 
   This PR addresses the Streams case where a dynamic member explicitly closes with REMAIN_IN_GROUP and the poll timer expires during close! 


-- 
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-21219: Fix Streams group close stall with REMAIN_IN_GROUP after poll timeout [kafka]

Posted by "lucasbru (via GitHub)" <gi...@apache.org>.
lucasbru commented on PR #23712:
URL: https://github.com/apache/kafka/pull/23712#issuecomment-6019874467

   FWIW, I don't think we REMAIN_IN_GROUP, so it shoulnd't be any more likely on the stream side.


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