Copilot commented on code in PR #11557:
URL: https://github.com/apache/ozone/pull/11557#discussion_r4287037483


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ECUnderReplicationHandler.java:
##########
@@ -519,12 +521,15 @@ private int processDecommissioningIndexes(
               new ArrayList<>(decomIndexes), sources, availableSourceNodes,
               excludedNodes, usedNodes);
           if (commandsSent > 0) {
+            metrics.incrEcReconstructionDecommissionTriggeredTotal();
             return commandsSent;
           }
+          metrics.incrEcDecommissionReconstructionFallbackNoOpTotal();
         } catch (CommandTargetOverloadedException e) {

Review Comment:
   A new behavior is introduced for the 'no-op' reconstruction attempt path 
(`incrEcDecommissionReconstructionFallbackNoOpTotal()` when `commandsSent == 
0`), but the updated tests in this PR don't assert this counter. Add a unit 
test case where `trySendReconstruction(...)` returns 0 commands, and assert 
`ecDecommissionReconstructionFallbackNoOpTotal` increments (and that other 
related counters remain unchanged) to prevent regressions.



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManagerMetrics.java:
##########
@@ -87,6 +87,15 @@ public final class ReplicationManagerMetrics implements 
MetricsSource {
       "OverReplicatedQueueSize",
       "Number of containers currently in the over replicated queue");
 
+  private static final MetricsInfo INFLIGHT_EC_RECONSTRUCTION = Interns.info(
+      "InflightEcReconstructionCommands",

Review Comment:
   The metric name `InflightEcReconstructionCommands` is inconsistent with the 
existing inflight gauge naming pattern (eg `InflightReplication`, 
`InflightEcDeletion`) which does not include a `Commands` suffix. Consider 
renaming to align with the established convention (e.g., 
`InflightEcReconstruction`) to reduce confusion and keep dashboards/metrics 
queries consistent.



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