apoorvmittal10 commented on code in PR #17709:
URL: https://github.com/apache/kafka/pull/17709#discussion_r1834140377
##########
core/src/main/java/kafka/server/share/SharePartitionManager.java:
##########
@@ -658,25 +651,26 @@ private SharePartition
getOrCreateSharePartition(SharePartitionKey sharePartitio
});
}
- private void maybeCompleteInitializationWithException(
+ private void handleInitializationException(
SharePartitionKey sharePartitionKey,
- CompletableFuture<Map<TopicIdPartition, PartitionData>> future,
+ ShareFetch shareFetch,
Throwable throwable) {
if (throwable instanceof LeaderNotAvailableException) {
log.debug("The share partition with key {} is not initialized
yet", sharePartitionKey);
- // Do not process the fetch request for this partition as the
leader is not initialized yet.
- // The fetch request will be retried in the next poll.
- // TODO: Add the request to delayed fetch purgatory.
+ // Skip any handling for this error as the share partition is
still loading. The request
Review Comment:
We can only get LeaderNotAvailableException when SharePartition is in
INITIALIZING state. Which means that requests should be re-triggered once
initialization completes. This exception is only to know if SharePartition is
still initializing and never returned to client.
--
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]