hanishakoneru commented on a change in pull request #948: HDDS-1649. On installSnapshot notification from OM leader, download checkpoint and reload OM state URL: https://github.com/apache/hadoop/pull/948#discussion_r305041731
########## File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java ########## @@ -159,15 +159,18 @@ public void decNumKeys() { } public void setNumVolumes(long val) { - this.numVolumes.incr(val); + long oldVal = this.numVolumes.value(); + this.numVolumes.incr(val - oldVal); Review comment: Lets say numVolumes = 10. After that the OM is restarted or state is reloaded with a new DB checkpoint. Not the num of volumes in the VolumeTable is 20. If we increment the numVolumes metric by 20, then the metrics will show total num of volumes to be 30 whereas it should be only 20. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org