dajac commented on code in PR #15155: URL: https://github.com/apache/kafka/pull/15155#discussion_r1445797517
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/OffsetMetadataManager.java: ########## @@ -195,6 +196,11 @@ public OffsetMetadataManager build() { */ private final TimelineHashMap<Long, Offsets> pendingTransactionalOffsets; + /** + * The open transactions (producer ids) keyed by group. + */ + private final TimelineHashMap<String, TimelineHashSet<Long>> openTransactionsByGroup; Review Comment: I follow an approach similar to the one used in the scala implementation. We basically store the open producer ids per group and use them to search the corresponding partitions in `pendingTransactionalOffsets`. An alternative way would be to directly store the open transactions by group, topic and partition but this would use more space. Classic runtime vs space tradeoff. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org