sumitagrawl commented on code in PR #7552:
URL: https://github.com/apache/ozone/pull/7552#discussion_r1882004005
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/DeleteBlocksCommandHandler.java:
##########
@@ -650,6 +653,7 @@ public static boolean isDuplicateTransaction(long
containerId, KeyValueContainer
containerData.getDeleteTransactionId()));
} else if (delTX.getTxID() == containerData.getDeleteTransactionId()) {
duplicate = true;
+ metrics.incrTotalTransactionsDiscarded(1);
Review Comment:
currently, it can not determine correctly if there is duplicate as per
change in SCM logic. So this check may not provide much help.
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/DeleteBlocksCommandHandler.java:
##########
@@ -462,6 +464,7 @@ public List<Future<DeleteBlockTransactionExecutionResult>>
submitTasks(
Future<DeleteBlockTransactionExecutionResult> future =
executor.submit(new ProcessTransactionTask(tx));
futures.add(future);
+ blockDeleteMetrics.incrProcessedTransactionCount(1);
Review Comment:
its just submit to future, will not tell if processed, so having metric here
is not correct.
We can add this metrics at `processCmd() ` when updating result as
success/failure.
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/DeleteBlocksCommandHandler.java:
##########
@@ -144,6 +144,7 @@ public void handle(SCMCommand command, OzoneContainer
container,
container, context, connectionManager);
try {
deleteCommandQueues.add(cmd);
+ blockDeleteMetrics.incrTotalCommandsReceived(1);
Review Comment:
We already have metrics at global for commands dn is receiving. Now adding
metric for deleteCommand will lead to add metrics for all other commands. This
seems not required for each specific command.
Further, HB response have commands in queue at DN.
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/DeleteBlocksCommandHandler.java:
##########
@@ -157,6 +158,7 @@ public void handle(SCMCommand command, OzoneContainer
container,
};
updateCommandStatus(cmd.getContext(), cmd.getCmd(), updateFailure, LOG);
LOG.warn("Command is discarded because of the command queue is full");
+ blockDeleteMetrics.incrTotalCommandsDiscarded(1);
Review Comment:
chances of this occurence is rare now as per SCM track queue size of dn
also. so there will not be rejection / will be very rare. This metrics will not
be useful.
--
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]