slfan1989 commented on code in PR #7249:
URL: https://github.com/apache/ozone/pull/7249#discussion_r1800843706
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLogImpl.java:
##########
@@ -300,11 +285,29 @@ private void getTransaction(DeletedBlocksTransaction tx,
.setCount(transactionStatusManager.getOrDefaultRetryCount(
tx.getTxID(), 0))
.build();
+
+ // We have made an improvement here, and we expect that all replicas
+ // of the Container being sent will be included in the dnList.
+ // This change benefits ACK confirmation and improves deletion speed.
+ // The principle behind it is that
+ // DN can receive the command to delete a certain Container at the same
time and provide
+ // feedback to SCM at roughly the same time.
+ // This avoids the issue of deletion blocking,
+ // where some replicas of a Container are deleted while others do not
receive the delete command.
+ long containerId = tx.getContainerID();
for (ContainerReplica replica : replicas) {
- DatanodeDetails details = replica.getDatanodeDetails();
- if (!dnList.contains(details)) {
- continue;
+ DatanodeDetails datanodeDetails = replica.getDatanodeDetails();
+ if (!dnList.contains(datanodeDetails)) {
+ DatanodeDetails dnDetail = replica.getDatanodeDetails();
+ LOG.debug("Skip Container = {}, because DN = {} is not in dnList.",
+ containerId, dnDetail.getUuid());
+ metrics.incrSkippedTransaction();
Review Comment:
I updated this metric before `continue`; do you think this modification is
okay?
```
if (checkInadequateReplica(replicas, txn, dnList)) {
metrics.incrSkippedTransaction();
continue;
}
```
--
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]