This is an automated email from the ASF dual-hosted git repository. dineshc pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push: new 2eb7246ea754 HDFS-17433. metrics sumOfActorCommandQueueLength should only record valid commands. (#6644) 2eb7246ea754 is described below commit 2eb7246ea754af456350723e5ea8ec397c1eb1f5 Author: hfutatzhanghb <hfutzhan...@163.com> AuthorDate: Thu Mar 21 11:41:35 2024 +0800 HDFS-17433. metrics sumOfActorCommandQueueLength should only record valid commands. (#6644) --- .../java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java index 462b9df3c9c8..da30d057966c 100755 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java @@ -1487,8 +1487,10 @@ class BPServiceActor implements Runnable { } void enqueue(DatanodeCommand[] cmds) throws InterruptedException { - queue.put(() -> processCommand(cmds)); - dn.getMetrics().incrActorCmdQueueLength(1); + if (cmds.length != 0) { + queue.put(() -> processCommand(cmds)); + dn.getMetrics().incrActorCmdQueueLength(1); + } } } --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org