liuliuOD commented on code in PR #23564:
URL: https://github.com/apache/kafka/pull/23564#discussion_r4091556300


##########
streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/RestoreIntegrationTest.java:
##########
@@ -257,7 +258,7 @@ public void shouldRestoreNullRecord(final boolean 
useNewProtocol, final boolean
                 consumerConfig, outputTopic, initialKeyValues);
 
         // wipe out state store to trigger restore process on restart
-        streams.close();
+        
streams.close(CloseOptions.groupMembershipOperation(CloseOptions.GroupMembershipOperation.LEAVE_GROUP));

Review Comment:
   I checked the configurations here.
   - There is no `group.instance.id`, so the `useNewProtocol = true` cases use 
the Streams protocol with dynamic membership. In those cases, the default 
close() already performs `LEAVE_GROUP`.
   - For `useNewProtocol = false`, the classic protocol default is to remain in 
the group.
   
   Would you prefer one of these approaches?
   1. Keep explicit `LEAVE_GROUP` only where it is needed for the classic 
protocol, minimizing redundant calls for the Streams protocol cases.
   2. Keep explicit `LEAVE_GROUP` consistently for all restart-related 
shutdowns, to make the intended lifecycle behavior explicit and uniform.
   
   I’m fine with either approach. I’d like to confirm which style is preferred 
here.



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

Reply via email to