dajac commented on code in PR #15221:
URL: https://github.com/apache/kafka/pull/15221#discussion_r1458553635
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/OffsetMetadataManager.java:
##########
@@ -856,7 +899,8 @@ public boolean cleanupExpiredOffsets(String groupId,
List<Record> records) {
});
metrics.record(OFFSET_EXPIRED_SENSOR_NAME, expiredPartitions.size());
- return allOffsetsExpired.get();
+ // We don't want to remove the group if there are ongoing transactions.
+ return allOffsetsExpired.get() &&
!openTransactionsByGroup.containsKey(groupId);
Review Comment:
Because there may be pending transactional offsets for partitions which are
not in the main storage yet. When we iterate over `offsetsByTopic`, we don't
see those. Therefore, it is better to prevent expiring the group if there are
ongoing transactions.
--
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]