I moved this up because it seems safer. The code above also calls `getOrCreateReplica` for all replicas in ISR. I am not sure if we can get LeaderAndIsr for new partition where there are no replicas in ISR (in leaderAndIsr request) -- probably not? So, probably there is no bug in the original code, but still seems safer to call `createOrGetReplica` earlier, before trying to use any Replica object.
[ Full content available at: https://github.com/apache/kafka/pull/5557 ] This message was relayed via gitbox.apache.org for [email protected]
