hudeqi commented on PR #15706: URL: https://github.com/apache/kafka/pull/15706#issuecomment-2058152299
> Hi @hudeqi. Thanks for the patch. I would like to better understand it. My first question is how would Flink commit Flink with a generationId equal to -1? The generation of the group is only managed by the group. It is not possible to alter it from an external system. The -1 passed in the offset commit request is only used for validation purposes. > > The reason why we don't write a tombstone in this case is because the group was never materialized in the log if it stayed at generation 0. I am not sure it is a worthwhile optimization though. @dajac Thank you for your review. The answer for first question: Flink only uses Kafka to commit and store offsets, and its group is not managed by Kafka. By default, the commit generation value is always -1. Since the generation is only changed when members are managed in Kafka, Flink's generation remains -1 and will not be changed. The answer for second question: In the case of using Kafka only to store and commit offsets, the group is also initialized in the `groupMetadataCache` in memory. In the log, the group's metadata and offsetMetadata are also written to `__consumer_offsets`. Therefore, considering data consistency, they should all be cleaned up when being purged. -- 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