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


##########
core/src/main/java/kafka/server/share/DelayedShareFetch.java:
##########
@@ -119,18 +120,11 @@ public void onComplete() {
             });
 
             log.trace("Data successfully retrieved by replica manager: {}", 
responseData);
-            ShareFetchUtils.processFetchResponse(shareFetchData, responseData, 
partitionCacheMap, replicaManager)
-                .whenComplete((result, throwable) -> {
-                    if (throwable != null) {
-                        log.error("Error processing fetch response for share 
partitions", throwable);
-                        
shareFetchData.future().completeExceptionally(throwable);
-                    } else {
-                        shareFetchData.future().complete(result);
-                    }
-                    // Releasing the lock to move ahead with the next request 
in queue.
-                    releasePartitionLocks(shareFetchData.groupId(), 
topicPartitionData.keySet());
-                });
-
+            Map<TopicIdPartition, ShareFetchResponseData.PartitionData> result 
=

Review Comment:
   I might be missing something here. There is `releasePartitionLocks` call as 
well in `catch` block for unknowns. Though I have moved removed them from both 
places and moved to finally block. Is that what you meant?



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