Skip to content

Commit

Permalink
HDFS-17433. metrics sumOfActorCommandQueueLength should only record v…
Browse files Browse the repository at this point in the history
…alid commands. (#6644)
  • Loading branch information
hfutatzhanghb authored Mar 21, 2024
1 parent 77c600d commit 2eb7246
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1487,8 +1487,10 @@ void enqueue(List<DatanodeCommand> cmds) throws InterruptedException {
}

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);
}
}
}

Expand Down

0 comments on commit 2eb7246

Please sign in to comment.