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 07:26:09 UTC
[PR] KAFKA-21212: Fix rack ID removal on Streams static member rejoin. [kafka]
chickenchickenlove opened a new pull request, #23705:
URL: https://github.com/apache/kafka/pull/23705
Fixes KAFKA-21212
When a Streams static member restarted after removing `client.rack`, the coordinator retained the previous rack ID. During static member replacement, the coordinator copies the previous memberโs metadata, then applies the incoming updates. Because `maybeUpdateRackId` treats null as unchanged, the joining request could not clear the copied rack ID. This left stale rack information in group descriptions and custom assignor inputs.
This change distinguishes joining requests from regular heartbeats, following the existing handling of `userEndpoint`. Joining requests now apply the rack ID directly, including null to clear the previous value. Regular heartbeats continue to preserve the existing rack ID when the field is omitted. Clearing a previously configured rack ID also allows the existing metadata change detection to bump the group epoch and trigger assignment recomputation.
--
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-21212: Fix rack ID removal on Streams static member rejoin. [kafka]
Posted by "lucasbru (via GitHub)" <gi...@apache.org>.
lucasbru merged PR #23705:
URL: https://github.com/apache/kafka/pull/23705
--
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-21212: Fix rack ID removal on Streams static member rejoin. [kafka]
Posted by "chickenchickenlove (via GitHub)" <gi...@apache.org>.
chickenchickenlove commented on PR #23705:
URL: https://github.com/apache/kafka/pull/23705#issuecomment-6013934910
@lucasbru Hi!
There is a small bug in `StaticMember` with streams protocol.
When you get a chance, could you take a look? ๐โโ๏ธ
--
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-21212: Fix rack ID removal on Streams static member rejoin. [kafka]
Posted by "chickenchickenlove (via GitHub)" <gi...@apache.org>.
chickenchickenlove commented on PR #23705:
URL: https://github.com/apache/kafka/pull/23705#issuecomment-6028224499
Thanks for taking the time to review! ๐โโ๏ธ
--
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-21212: Fix rack ID removal on Streams static member rejoin. [kafka]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #23705:
URL: https://github.com/apache/kafka/pull/23705#discussion_r4195068316
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/StreamsGroupStaticMemberGroupMetadataManagerTest.java:
##########
@@ -1332,8 +1337,9 @@ public void testStaticMemberLeaveWithLeaveGroupStaticMemberEpochFromUnrevokedSta
}
- @Test
- public void testStaticMemberLeaveWithLeaveGroupStaticMemberEpochAndRejoinAndOtherRackIdThenGroupBumpOccur() {
+ @ParameterizedTest
+ @MethodSource("rackIdCases")
+ public void testStaticMemberLeaveWithLeaveGroupStaticMemberEpochAndRejoinAndOtherRackIdThenGroupBumpOccur(String newRackId) {
Review Comment:
This parameterized test now also covers rack removal (`newRackId == null`), but its name only describes switching to another rack ID. Rename it to include both changed and removed rack IDs so the test's scope is clear.
--
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