sodonnel commented on code in PR #3984:
URL: https://github.com/apache/ozone/pull/3984#discussion_r1028148422
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ECUnderReplicationHandler.java:
##########
@@ -114,11 +123,13 @@ public Map<DatanodeDetails, SCMCommand<?>>
processAndCreateCommands(
final ContainerHealthResult result,
final int remainingMaintenanceRedundancy) throws IOException {
ContainerInfo container = result.getContainerInfo();
- ECReplicationConfig repConfig =
- (ECReplicationConfig) container.getReplicationConfig();
final ECContainerReplicaCount replicaCount =
new ECContainerReplicaCount(container, replicas, pendingOps,
remainingMaintenanceRedundancy);
+
+ // TODO - do we really need to recheck the health via ecReplicationCheck?
+ // Is it not enough to assume it was under-replicated if it got here
+ // and then use the replica count object to validate it is
under-rep?
Review Comment:
I wonder if we can remove all this stuff which sends the check back to the
under-rep handler for a new health result? From the containerReplicaCount we
can see if it is under replicated easily enough and just proceed to fix it.
There was similar stuff in the OverReplicationHander which I took out to
allow it to be called with an underReplicatedHealthesult object in this PR.
--
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]