soarez commented on PR #16118:
URL: https://github.com/apache/kafka/pull/16118#issuecomment-2144080705

   @showuon thanks for testing and sharing this.
   
   In those logs the controller is rejecting the assignment with a 
`NOT_LEADER_OR_FOLLOWER` because the partition has been moved away from the 
broker. Here the controller is comparing broker IDs, not directory IDs. A 
failed assignment is re-qeueued, so this error will persist until the broker 
dies or the replica is assigned back to it.
   
   I'm thinking of two options:
   
   1. Cancel any pending assignment for a replica when a metadata update shows 
the broker is no longer a replica for that partition.
   2. Accept `NOT_LEADER_OR_FOLLOWER` as indication that a reassignment has 
taken place, and do not retry.
   
   I'm leaning towards option 2. since it's much simpler and there's no other 
case when `handleAssignReplicasToDirs` returns `NOT_LEADER_OR_FOLLOWER`


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to