lucasbru commented on code in PR #21433:
URL: https://github.com/apache/kafka/pull/21433#discussion_r2792380669
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java:
##########
@@ -1879,6 +1879,9 @@ private void completeShutdown(final boolean cleanRun) {
try {
final GroupMembershipOperation membershipOperation =
leaveGroupRequested.get() ==
org.apache.kafka.streams.CloseOptions.GroupMembershipOperation.LEAVE_GROUP ?
LEAVE_GROUP : REMAIN_IN_GROUP;
+ if (membershipOperation == REMAIN_IN_GROUP &&
streamsRebalanceData.isPresent()) {
Review Comment:
The pattern `streamsRebalanceData.isPresent()` is already used throughout
this file to check for the streams protocol (lines 1122, 1128, 1178, 1332,
1503). Introducing a separate `GroupProtocol` member variable would add
redundancy since `streamsRebalanceData` is only populated when using the
streams protocol.
If you think we should change the pattern, it would be a larger cleanup
across the file. Happy to do that as a separate PR if you prefer, but for this
minor doc change I'd prefer to stay consistent with the existing pattern.
--
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]