Skip to content

Commit 00e0c58

Browse files
authored
MINOR: Log time spent cleaning share group state (#21278)
This patch logs the time spent while cleaning the share group state on topic deletions. Reviewers: Andrew Schofield <aschofield@confluent.io>
1 parent 1df2ac5 commit 00e0c58

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorShard.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,13 @@ public CoordinatorResult<Void, CoordinatorRecord> onTopicsDeleted(
10381038
public CoordinatorResult<Void, CoordinatorRecord> maybeCleanupShareGroupState(
10391039
Set<Uuid> deletedTopicIds
10401040
) {
1041-
return groupMetadataManager.maybeCleanupShareGroupState(deletedTopicIds);
1041+
final long startTimeMs = time.milliseconds();
1042+
final var result = groupMetadataManager.maybeCleanupShareGroupState(deletedTopicIds);
1043+
1044+
log.info("Generated {} records in {} milliseconds while cleaning share group state for topics {}.",
1045+
result.records().size(), time.milliseconds() - startTimeMs, deletedTopicIds);
1046+
1047+
return result;
10421048
}
10431049

10441050
/**

0 commit comments

Comments
 (0)