This is not unclean leader election since the follower is still in ISR. Yes we will loose those 2000 messages.
Mayuresh Sent from my iPhone > On May 20, 2015, at 8:31 AM, tao xiao <xiaotao...@gmail.com> wrote: > > Hi team, > > I know that if a broker is behind the leader by no more than > replica.lag.max.messages > the broker is considered in sync with the leader. Considering a situation > where I have unclean.leader.election.enable=true set in brokers and the > follower is now 2000 messages behind (the default replica.lag.max.messages > is 4000), will the follower be elected as the leader if the current leader > is down? if yes do we lose that 2000 messages? > > -- > Regards, > Tao