The minimum possible number of iteration to make sure we catch this bug is 3. 
Because the session timeout is 1000 ms. That means that the heartbeat of the 
previous consumer should timeout in 1000 ms and that would trigger another 
unnecessary rebalance if the heartbeat delayed operation is not removed at the 
end of the first rebalance.

1000 ms is 2 iterations. So for the code to verify the existence or absence of 
the error, we just need another extra iteration, which is (2 + 1) = 3.

I chose to make it 20 iteration is to verify the consumer group stays stable in 
a much longer period of time after the rebalance. Plus that running each 
iteration takes a negligible amount of time.

[ Full content available at: https://github.com/apache/kafka/pull/5556 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to