Hi Jason,

Jason wrote:
> Thanks for the updates. I noticed that `LeaderRecoveryState` is marked as
> ignorable in the `AlterPartition` request. It would be helpful to
> understand the motivation for that.

I think it is fine for this property to be marked as ignorable because
the property is always RECOVERED for the AlterPartition request.

The partition leader only sends an AlterPartition request if either
the ISR or the LeaderRecoveryState has changed. First, the ISR is not
allowed to change unless the LeaderRecoveryState is already marked as
RECOVERED. This will be enforced by the controller. This is guaranteed
by the leader because Fetch requests will return
NOT_LEADER_OR_FOLLOWER while the leader is RECOVERING. Second, the
LeaderRecoveryState is only allowed to change to RECOVERED. The broker
will never change the LeaderRecoveryState from RECOVERED to RECOVERING
and the controller will reject such changes.

Thanks,
-José

Reply via email to