sodonnel commented on code in PR #4577:
URL: https://github.com/apache/ozone/pull/4577#discussion_r1168917323
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/MisReplicationHandler.java:
##########
@@ -115,38 +115,11 @@ private Set<ContainerReplica>
filterSources(Set<ContainerReplica> replicas) {
.collect(Collectors.toSet());
}
- protected abstract ReplicateContainerCommand updateReplicateCommand(
- ReplicateContainerCommand command, ContainerReplica replica);
-
- private int sendReplicateCommands(
+ protected abstract int sendReplicateCommands(
Review Comment:
I think we need to add another parameter to this method -
`List<DatanodeDetails> availableSources`.
If you check line 171 in this PR, it forms a list of replicasToBeReplicated.
In the case of EC, that is the list of sources we must use, as it needs to copy
index 2 to a new rack.
For Ratis, it will pick one node to copy from the placement policy, but we
can use any source.
Therefore if you pass sources, formed on line 161:
```
Set<ContainerReplica> sources = filterSources(replicas);
```
That will be the list of all available sources. Inside the Ratis sub-class,
it can use that for the sources and ignore replicasToBeReplicated from a source
perspective.
Inside the EC handler, it would ignore the allSources and just use
replicasToBeReplicated.
--
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]