lucasbru commented on code in PR #20755:
URL: https://github.com/apache/kafka/pull/20755#discussion_r2502973677
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -8182,6 +8182,7 @@ public void createGroupTombstoneRecords(
) {
// At this point, we have already validated the group id, so we know
that the group exists and that no exception will be thrown.
createGroupTombstoneRecords(group(groupId), records);
+ timer.cancel(streamsInitialRebalanceKey(groupId));
Review Comment:
This is already executed in the line above.
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
Review Comment:
createGroupTombstoneRecordsAndCancelTimers
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
@@ -8195,6 +8196,7 @@ public void createGroupTombstoneRecords(
List<CoordinatorRecord> records
) {
group.createGroupTombstoneRecords(records);
+ timer.cancel(streamsInitialRebalanceKey(group.groupId()));
Review Comment:
Other timers are cancelled using a dedicated cancel function like this:
```
/**
* Cancels the sync timeout of the member.
*
* @param groupId The group id.
* @param memberId The member id.
*/
private void cancelConsumerGroupSyncTimeout(
String groupId,
String memberId
) {
timer.cancel(consumerGroupSyncKey(groupId, memberId));
}
```
Best to follow that pattern.
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java:
##########
Review Comment:
createGroupTombstoneRecordsAndCancelTimers ?
--
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]