ableegoldman commented on pull request #10986:
URL: https://github.com/apache/kafka/pull/10986#issuecomment-878748345


   Ok I realize we actually do have a test that reproduces this already: 
`ConsumerCoordinatorTest.testRebalanceWithMetadataChange`. This test sets up a 
case where a change in topic metadata triggers a rebalance after a member had 
joined the group, after which the change is reverted so that the metadata is 
ultimately the same. Then a `NOT_COORDINATOR` response is sent to fail the 
initial JoinGroup, and the test just verifies that the member attempts to 
rejoin until successful. It also verifies things like the number of times each 
rebalance callback is invoked, and the set of partitions that the callbacks 
receive.
   This test actually only failed in the COOPERATIVE case, which confirms that 
the behavior remains correct for the EAGER case. When following the COOPERATIVE 
protocol, the test was formerly assuming that the member would retain all 
partitions despite actually having its generation and memberId cleared when the 
initial JoinGroup is failed. So it was technically asserting the wrong behavior 
beforehand; just fixing this gives us a unit test for this patch after all.


-- 
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


Reply via email to