aswinshakil commented on code in PR #9829:
URL: https://github.com/apache/ozone/pull/9829#discussion_r2962117132
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/QuasiClosedStuckReplicaCount.java:
##########
@@ -106,28 +157,29 @@ public List<MisReplicatedOrigin>
getUnderReplicatedReplicas() {
misReplicatedOrigins.add(new MisReplicatedOrigin(entry.getValue(),
additionalReplicas));
}
} else {
- if (inService.size() < 3) {
- int additionalReplicas = 3 - inService.size();
+ if (inService.size() < bestOriginCopies) {
Review Comment:
Okay we can keep it 3 itself. I can make the change. But looking at this
code I'm wondering if this logic is even executed. Both
`getOverReplicatedOrigins` and `getUnderReplicatedReplicas` are only called if
the container is handled by either `QuasiClosedStuckOverReplicationHandler` or
`QuasiClosedStuckUnderReplicationHandler`.
But if we look at `shouldHandleAsQuasiClosedStuck` it skips the container if
we have only one originId. So replicas with only one originId are never handled
by `QuasiClosedStuckOverReplicationHandler` or
`QuasiClosedStuckUnderReplicationHandler`.
So this part of the code is it mostly like fail safe if the code is used
somewhere in the future.
--
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]