[ https://issues.apache.org/jira/browse/KAFKA-12920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17360480#comment-17360480 ]
A. Sophie Blee-Goldman commented on KAFKA-12920: ------------------------------------------------ I believe we've found the real issue, and are just discussing what the correct behavior here should be. I'm going to close this ticket as 'Not a Bug' and file a separate issue with the problems we've found in the Consumer/AbstractCoordinator that have resulted in [this|https://issues.apache.org/jira/browse/KAFKA-12896] odd behavior we observed with the cooperative-sticky assignor > Consumer's cooperative sticky assignor need to clear generation / assignment > data upon `onPartitionsLost` > --------------------------------------------------------------------------------------------------------- > > Key: KAFKA-12920 > URL: https://issues.apache.org/jira/browse/KAFKA-12920 > Project: Kafka > Issue Type: Bug > Reporter: Guozhang Wang > Priority: Major > Labels: bug, consumer > > Consumer's cooperative-sticky assignor does not track the owned partitions > inside the assignor --- i.e. when it reset its state in event of > ``onPartitionsLost``, the ``memberAssignment`` and ``generation`` inside the > assignor would not be cleared. This would cause a member to join with empty > generation on the protocol while with non-empty user-data encoding the old > assignment still (and hence pass the validation check on broker side during > JoinGroup), and eventually cause a single partition to be assigned to > multiple consumers within a generation. > We should let the assignor to also clear its assignment/generation when > ``onPartitionsLost`` is triggered in order to avoid this scenario. > Note that 1) for the regular sticky assignor the generation would still have > an older value, and this would cause the previously owned partitions to be > discarded during the assignment, and 2) for Streams' sticky assignor, it’s > encoding would indeed be cleared along with ``onPartitionsLost``. Hence only > Consumer's cooperative-sticky assignor have this issue to solve. -- This message was sent by Atlassian Jira (v8.3.4#803005)