dombizita commented on code in PR #11148:
URL: https://github.com/apache/ozone/pull/11148#discussion_r3894347345
##########
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:
The second loop shouldn't be the target nodes?
```suggestion
for (ReconstructECContainersCommand.DatanodeDetailsAndReplicaIndex
target : command.getTargetDatanodes()) {
```
Maybe worth to add a test case that covers this.
--
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]