chia7712 commented on code in PR #17283: URL: https://github.com/apache/kafka/pull/17283#discussion_r1779817685
########## 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: Moving it to the finally block seems a bit odd because the lock isn’t set when `topicPartitionData` is empty. -- 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