priyeshkaratha commented on code in PR #10564:
URL: https://github.com/apache/ozone/pull/10564#discussion_r3450028996


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/HddsVolume.java:
##########
@@ -203,6 +203,9 @@ public void failVolume() {
     if (volumeIOStats != null) {
       volumeIOStats.unregister();
     }
+    if (volumeInfoMetrics != null) {
+      volumeInfoMetrics.unregister();

Review Comment:
   Yes, @adoroszlai, that's a valid point. Unregistering the metrics would 
impact observability for failed volumes.
   
   I can still see these metrics on the DataNode via JMX using:
   
   `$http.get("jmx?qry=Hadoop:service=HddsDatanode,name=VolumeInfoMetrics*")`
   
   As you mentioned, the reported values may differ because of this behavior.
   
   Given that, I think it's better to address the NPE handling in the metrics 
code rather than change the existing behavior. I'll go ahead and close this PR.
   



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