apoorvmittal10 commented on code in PR #17709:
URL: https://github.com/apache/kafka/pull/17709#discussion_r1838952613


##########
core/src/main/java/kafka/server/share/DelayedShareFetch.java:
##########
@@ -315,11 +325,17 @@ else if (isolationType == FetchIsolation.HIGH_WATERMARK)
     }
 
     private Map<TopicIdPartition, LogReadResult> 
readFromLog(Map<TopicIdPartition, FetchRequest.PartitionData> 
topicPartitionData) {
+        // Filter if there already exists any erroneous topic partition.
+        Set<TopicIdPartition> partitionsToFetch = 
shareFetch.filterErroneousTopicPartitions(topicPartitionData.keySet());

Review Comment:
   The getPartitionorException API is called after acquiring share partitions 
hence if some share partition has errored out after acquiring then the 
readFromLog will trigger for that topicPartition. Hence it's best to filter 
before the expecsive `readFromLog` API call.
   Also if the share partition is errored which is not recoverable then in 
`acquirablePartitions` the fetch lock API should return false.



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