KAFKA-18185: remove internal.leave.group.on.close config#19400
KAFKA-18185: remove internal.leave.group.on.close config#19400bbejeck merged 87 commits intoapache:trunkfrom
Conversation
|
@mjsax Not sure - the default for the consumer was to leave the group for dynamic members, so I think the example is correct? We just need to make sure that Kafka Streams will use But I'm also confused. In KIP-1092, I see this: And further down, in the test plan: This seems clear. But in the new consumer code, a different behavior seems to be documented, see https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerMembershipManager.java#L431-L436 This seems to be completely different from the KIP. I did not check the implementation in detail though. |
frankvicky
left a comment
There was a problem hiding this comment.
Hi @lucasbru
This patch has been pending for a long time, so I need some time to recall.
The difference you mentioned should be an inaccurate comment, as the REMAIN_IN_GROUP function has an early return.
I will take a look
|
Oh sorry. I mixed up this work with the corresponding KS work... https://cwiki.apache.org/confluence/display/KAFKA/KIP-1153%3A+Refactor+Kafka+Streams+CloseOptions+to+Fluent+API+Style |
|
@lucasbru: I have reviewed #17614. I suppose the difference you mentioned is due to #17614 (comment). |
|
@frankvicky: This makes sense, then. So remaining in group means sending the leave epoch in the static case. Then it is just the code comment that is misleading and could probably be updated to state what you said in the PR comment that you referenced. Will implement these changes also for KIP-1071 then? While static membership isn't fully implemented yet for KIP-1071, we should still pull through those changes. |
|
High level comment: Is it wise to complete this PR before #19955 ? -- It seems we should only remove the internal config, after we got the public API change for KS merged? Otherwise, even if not publicly user facing, we are loosing the ability to change KS's behavior on |
|
Just talked to @bbejeck about this, and he will prioritize KIP-1153 to make sure we get is merged. |
|
@frankvicky What I actually meant to ask in my previous comment: Are you planning to implement these changes also for KIP-1071? While static membership isn't fully implemented yet for KIP-1071, we should still pull through those changes. |
|
@lucasbru: Sorry that I missed responding to your question. |
|
@frankvicky It looks like that integration test was broken by #20284 . I can see that it passes on CI only because it is first run with the old protocol, and then run with the new protocol, and in the new protocol it shuts down only because it tries to reuse the group ID from the first run. At this time, the member from the first run is still in the group, so we get an error that the group is of the incorrect protocol type. I created https://issues.apache.org/jira/browse/KAFKA-19660 for that. This indeed shines a light on your (this) PR though: It seems to changes the default for Kafka Streams: it leaves the group when |
There was a problem hiding this comment.
Thanks @frankvicky for the PR! I just have one minor comment, but overall this looks good. Since this PR has been around for a while can you rebase? NM I see you did that just 4 days a ago
Apologies for taking so long for the review
| public void shutdown(final boolean leaveGroup) { | ||
| log.info("Informed to shut down"); | ||
| final State oldState = setState(State.PENDING_SHUTDOWN); | ||
| if (leaveGroup) { |
There was a problem hiding this comment.
couldn't this be simplified to leaveGroupRequested.set(leaveGroup)
There was a problem hiding this comment.
Nice catch!
I have amended it.
|
@frankvicky I'm going to make a pass regarding this comment from @lucasbru - |
bbejeck
left a comment
There was a problem hiding this comment.
Thanks for the PR @frankvicky LGTM
|
Merged #19400 into trunk |
JIRA: KAFKA-18185 This is a follow-up of apache#17614 The patch is to remove the `internal.leave.group.on.close` config. Reviewers: Sophie Blee-Goldman <ableegoldman@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>, Bill Bejeck <bbejeck@apache.org>
JIRA: KAFKA-18185 This is a follow-up of apache#17614 The patch is to remove the `internal.leave.group.on.close` config. Reviewers: Sophie Blee-Goldman <ableegoldman@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>, Bill Bejeck <bbejeck@apache.org>
JIRA: KAFKA-18185
This is a follow-up of #17614 The patch is to remove the
internal.leave.group.on.closeconfig.Reviewers: Sophie Blee-Goldman ableegoldman@gmail.com, Chia-Ping Tsai
chia7712@gmail.com, Bill Bejeck bbejeck@apache.org