vamossagar12 commented on PR #14051:
URL: https://github.com/apache/kafka/pull/14051#issuecomment-1643633746

   Thanks @showuon I did consider writing a test but felt since this is looks 
like a race  condition i.e fetch request from follower coming in around the 
same time the `remoteReplicasMap` gets cleared, it seemed hard to replicate in 
unit tests. I did try updating  the test you suggested to 
   
   1) Execute a partition.delete and try to do a fetchfollower. It fails with 
`NotLeaderOrFollowerException`.
   2) Execute partition.delete on a separate thread and executing the 
fetchFollower on the main Test thread. Even in that case, I got `Replica not 
Found`.
   
   


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to