ozone icon indicating copy to clipboard operation
ozone copied to clipboard

HDDS-10907. DataNode StorageContainerMetrics numWriteChunk is counted multiple times

Open chungen0126 opened this issue 1 year ago • 1 comments

What changes were proposed in this pull request?

StorageContainerMetrics.incContainerOpsMetrics() updates operation counts. It is incremented not just once for WriteChunk, because it is called by HddsDispatcher.dispatchRequest() during WRITE_DATA (by ContainerStateMachine.writeStateMachineData()) and COMMIT_DATA phase.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-10907

How was this patch tested?

Add assertion of containerMetrics in TestBlockOutputStream

chungen0126 avatar Jun 19 '24 09:06 chungen0126

It seem that adding the test in TestContainerMetrics is better. I'll update it later.

chungen0126 avatar Jun 20 '24 13:06 chungen0126

@jojochuang CI passed, in case you want to merge

adoroszlai avatar Jul 10 '24 19:07 adoroszlai