[ https://issues.apache.org/jira/browse/KAFKA-19163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Quah updated KAFKA-19163: ------------------------------ Description: When a group has pending transactional offsets and no committed offsets, the group coordinator's periodic cleanup process can delete the group prematurely. This is not great if the pending transactional offsets then get committed. When there are committed offsets to clean up, we check whether there are open transactions and avoid deleting the group if any exist. https://github.com/apache/kafka/blob/5d2bfb4151700000fc5ec22918ecd3cecb5178a5/group-coordinator/src/main/java/org/apache/kafka/coordinator/group/OffsetMetadataManager.java#L888 However, we don't do the same check when there are no committed offsets to clean up. https://github.com/apache/kafka/blob/5d2bfb4151700000fc5ec22918ecd3cecb5178a5/group-coordinator/src/main/java/org/apache/kafka/coordinator/group/OffsetMetadataManager.java#L850-L855 was: When a group has pending transactional offsets and no committed offsets, the group coordinator's periodic cleanup process can delete the group prematurely. This is not great if the pending transactional offsets then get committed. https://github.com/apache/kafka/blob/5d2bfb4151700000fc5ec22918ecd3cecb5178a5/group-coordinator/src/main/java/org/apache/kafka/coordinator/group/OffsetMetadataManager.java#L850-L855 > New group coordinator can incorrectly delete groups with pending > transactional offsets > -------------------------------------------------------------------------------------- > > Key: KAFKA-19163 > URL: https://issues.apache.org/jira/browse/KAFKA-19163 > Project: Kafka > Issue Type: Bug > Components: group-coordinator > Reporter: Sean Quah > Assignee: Sean Quah > Priority: Major > > When a group has pending transactional offsets and no committed offsets, the > group coordinator's periodic cleanup process can delete the group > prematurely. This is not great if the pending transactional offsets then get > committed. > When there are committed offsets to clean up, we check whether there are open > transactions and avoid deleting the group if any exist. > https://github.com/apache/kafka/blob/5d2bfb4151700000fc5ec22918ecd3cecb5178a5/group-coordinator/src/main/java/org/apache/kafka/coordinator/group/OffsetMetadataManager.java#L888 > However, we don't do the same check when there are no committed offsets to > clean up. > https://github.com/apache/kafka/blob/5d2bfb4151700000fc5ec22918ecd3cecb5178a5/group-coordinator/src/main/java/org/apache/kafka/coordinator/group/OffsetMetadataManager.java#L850-L855 -- This message was sent by Atlassian Jira (v8.20.10#820010)