dajac commented on code in PR #14870:
URL: https://github.com/apache/kafka/pull/14870#discussion_r1413587663
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorShard.java:
##########
@@ -518,9 +526,13 @@ public CoordinatorResult<OffsetDeleteResponseData, Record>
deleteOffsets(
public CoordinatorResult<Void, Record> cleanupGroupMetadata() {
List<Record> records = new ArrayList<>();
groupMetadataManager.groupIds().forEach(groupId -> {
- if (offsetMetadataManager.cleanupExpiredOffsets(groupId, records))
{
+ long startMs = time.milliseconds();
+ boolean allOffsetsExpired =
offsetMetadataManager.cleanupExpiredOffsets(groupId, records);
+ if (allOffsetsExpired) {
groupMetadataManager.maybeDeleteGroup(groupId, records);
}
+ log.info("[GroupId {}] Generated {} tombstone records
(allOffsetsExpired={}) in {} milliseconds.",
+ groupId, records.size(), allOffsetsExpired,
time.milliseconds() - startMs);
Review Comment:
Hum... I thought that we would log only once for the entire
`cleanupGroupMetadata`.
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/OffsetMetadataManager.java:
##########
@@ -610,6 +610,7 @@ public boolean cleanupExpiredOffsets(String groupId,
List<Record> records) {
partitions.forEach((partition, offsetAndMetadata) -> {
if (condition.isOffsetExpired(offsetAndMetadata,
currentTimestampMs, config.offsetsRetentionMs)) {
expiredPartitions.add(appendOffsetCommitTombstone(groupId, topic, partition,
records).toString());
+ log.debug("[GroupId {}] Expired offset for tp={}-{}",
groupId, topic, partition);
Review Comment:
nit: `for partition`?
--
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]