HDFS-17433. metrics sumOfActorCommandQueueLength should only record valid commands. (#6644)

This commit is contained in:
hfutatzhanghb 2024-03-21 11:41:35 +08:00 committed by GitHub
parent 77c600d769
commit 2eb7246ea7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1487,10 +1487,12 @@ void enqueue(List<DatanodeCommand> cmds) throws InterruptedException {
}
void enqueue(DatanodeCommand[] cmds) throws InterruptedException {
if (cmds.length != 0) {
queue.put(() -> processCommand(cmds));
dn.getMetrics().incrActorCmdQueueLength(1);
}
}
}
@VisibleForTesting
void stopCommandProcessingThread() {