errose28 commented on code in PR #11148:
URL: https://github.com/apache/ozone/pull/11148#discussion_r3898479360


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManager.java:
##########
@@ -550,9 +550,23 @@ public void 
sendThrottledReconstructionCommand(ContainerInfo containerInfo,
     }
     DatanodeDetails target = selectAndOptionallyExcludeDatanode(
         rmConf.getReconstructionCommandWeight(), targetWithCmds);
+    command.setApparentVersion(computeVersionForReconstruction(command));
     sendDatanodeCommand(command, containerInfo, target);
   }
 
+  private ComponentVersion 
computeVersionForReconstruction(ReconstructECContainersCommand command) {
+    List<DatanodeInfo> involved = new ArrayList<>();
+    for (ReconstructECContainersCommand.DatanodeDetailsAndReplicaIndex source 
: command.getSources()) {
+      involved.add(getDatanodeInfo(source.getDnDetails()));
+    }
+    for (ReconstructECContainersCommand.DatanodeDetailsAndReplicaIndex target 
: command.getSources()) {

Review Comment:
   Good catch, fixed in the last commit. The unit tests were only testing that 
the lowest version was used when it was a source. I split the EC and 
replication tests to test the source and target being the lowest separately. 
Reconciliation sends the same command to all nodes so there is no source/target 
distinction to test there.



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