lpavanvenkat commented on code in PR #11247:
URL: https://github.com/apache/ozone/pull/11247#discussion_r4046177694


##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientRatis.java:
##########
@@ -399,12 +411,11 @@ public XceiverClientReply sendCommandAsync(
             ContainerCommandResponseProto response =
                 ContainerCommandResponseProto
                     .parseFrom(reply.getMessage().getContent());
-            UUID serverId = RatisHelper.toDatanodeId(reply.getReplierId());
             if (response.getResult() == ContainerProtos.Result.SUCCESS) {
               updateCommitInfosMap(reply.getCommitInfos(), watchType);
             }
             asyncReply.setLogIndex(reply.getLogIndex());
-            addDatanodetoReply(serverId, asyncReply);
+            addDatanodetoReply(reply.getReplierId(), asyncReply);

Review Comment:
   Good catch, thank you! You're right — reply.getDatanodes() is never read on 
a sendCommandAsync reply. Both consumers (BlockOutputStream.checkReply and 
BlockDataStreamOutput) only receive replies from the watchForCommit path 
(handleFailedAllCommit), which uses a separate XceiverClientReply object. The 
addDatanodetoReply call in sendCommandAsync was populating a list that is 
immediately discarded.
   
   Updated the patch to remove the call entirely, along with the String 
overload of addDatanodetoReply and the peerIdToDatanode map that only served 
it. The UUID overload used by handleFailedAllCommit is unchanged.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to