ABHIJITBURMAN opened a new pull request, #21316:
URL: https://github.com/apache/kafka/pull/21316

   
   ## Problem
   When a partition becomes a follower but the leader broker is not available 
in the metadata image, the code only logs at TRACE level, doesn't track the 
partition as failed, and logs a misleading success message with incorrect count.
   
   issue ticket: https://issues.apache.org/jira/browse/KAFKA-19331
   
   ## Solution
   - Changed log level from TRACE to INFO for better visibility
   - Added `addFailedPartition()` call to track failed partitions for retry
   - Fixed log message to use `partitionAndOffsets.size` instead of 
`partitionsToStartFetching.size`
   - Added conditional logging to avoid "Started fetchers for 0 partitions" 
message
   
   ## Testing
   Added unit test `testApplyLocalFollowersDeltaWhenLeaderNotInMetadata` to 
verify the fix.


-- 
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