smjn commented on code in PR #22835:
URL: https://github.com/apache/kafka/pull/22835#discussion_r4142678617


##########
server-common/src/main/java/org/apache/kafka/server/share/persister/PersisterStateManager.java:
##########
@@ -1553,10 +1637,15 @@ public Collection<RequestAndCompletionHandler> 
generateRequests() {
                                             oldVal.remove(coordNode);
                                             return oldVal;
                                         });
-                                        // now the combined request has 
completed
-                                        // we need to create responses for 
individual
-                                        // requests which composed the 
combined request
-                                        handlersPerGroup.forEach(handler1 -> 
handler1.onComplete(response));
+                                        // Demux the combined response once 
and share it across the handlers
+                                        // which composed the combined request 
(KAFKA-20803).
+                                        if (!handlersPerGroup.isEmpty()) {
+                                            PartitionResultIndex<?> 
sharedResultIndex = handlersPerGroup.get(0).buildResultIndex(response);

Review Comment:
   nit: shadows the class instance variable of same name.



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