sodonnel commented on code in PR #5293:
URL: https://github.com/apache/ozone/pull/5293#discussion_r1325853525


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLogImpl.java:
##########
@@ -460,7 +463,13 @@ public DatanodeDeletedBlockTransactions getTransactions(
               txIDs.add(txn.getTxID());
             } else if (txn.getCount() > -1 && txn.getCount() <= maxRetry
                 && !containerManager.getContainer(id).isOpen()) {
-              getTransaction(txn, transactions, dnList);
+              Set<ContainerReplica> replicas = containerManager
+                  .getContainerReplicas(
+                      ContainerID.valueOf(txn.getContainerID()));
+              if (checkInadequateReplica(replicas, txn)) {

Review Comment:
   Under replication can be caused by more than just too few replicas. You 
should probably make a call to 
`replicationManager.getContainerReplicationHealth(...)` to get the replication 
state, as it incorporates the logic around under, over and mis-replication 
along with unhealthy replicas too.
   
   Also see my comments in the link below - what about balancing which can 
cause new replicas to get created and old replicas removed?
   
   
https://issues.apache.org/jira/browse/HDDS-7728?focusedCommentId=17764748&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17764748



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