chia7712 commented on code in PR #20949:
URL: https://github.com/apache/kafka/pull/20949#discussion_r2558113495
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/StreamsGroup.java:
##########
@@ -823,6 +824,11 @@ public void
createGroupTombstoneRecords(List<CoordinatorRecord> records) {
records.add(StreamsCoordinatorRecordHelpers.newStreamsGroupTopologyRecordTombstone(groupId()));
}
+ @Override
+ public void cancelTimers(CoordinatorTimer<Void, CoordinatorRecord> timer) {
+ timer.cancel("initial-rebalance-timeout-" + groupId);
Review Comment:
To keep the code consistent, we could add a static helper to `StreamGroup`
and use it to implement `GroupMetadataManager.streamsInitialRebalanceKey`
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -8666,7 +8666,7 @@ void validateDeleteGroup(String groupId) throws
ApiException {
public void maybeDeleteGroup(String groupId, List<CoordinatorRecord>
records) {
Group group = groups.get(groupId);
if (group != null && group.isEmpty()) {
- createGroupTombstoneRecords(groupId, records);
+ createGroupTombstoneRecordsAndCancelTimers(groupId, records);
Review Comment:
Could we pass `group` instead of `groupId`?
--
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]