You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "chihsuan (via GitHub)" <gi...@apache.org> on 2026/10/06 13:42:09 UTC

[PR] HDDS-16726. Remove unused metrics from OMMetrics [ozone]

chihsuan opened a new pull request, #11421:
URL: https://github.com/apache/ozone/pull/11421

   ## What changes were proposed?
   
   Removes OMMetrics counters that are never updated (S3 bucket, volume check access, and some trash metrics), along with their dashboard references.
   
   ## JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16726
   
   ## How was this patch tested?
   
   CI: https://github.com/chihsuan/ozone/actions/runs/37472390734
   
   Generated-by: Claude Code (Claude Opus 5.5)
   


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16726. Remove unused metrics from OMMetrics [ozone]

Posted by "ivandika3 (via GitHub)" <gi...@apache.org>.
ivandika3 commented on code in PR #11421:
URL: https://github.com/apache/ozone/pull/11421#discussion_r4226330665


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -222,34 +217,25 @@ public class OMMetrics implements OmMetadataReaderMetrics {
 
   private @Metric MutableGaugeLong numVolumes;
   private @Metric MutableGaugeLong numBuckets;
-  private @Metric MutableCounterLong numS3Buckets;
 
   //TODO: This metric is an estimate and it may be inaccurate on restart if the
   // OM process was not shutdown cleanly. Key creations/deletions in the last
   // few minutes before restart may not be included in this count.
   private @Metric MutableGaugeLong numKeys;
 
-  private @Metric MutableCounterLong numBucketS3Creates;
-  private @Metric MutableCounterLong numBucketS3CreateFails;
-  private @Metric MutableCounterLong numBucketS3Deletes;
-  private @Metric MutableCounterLong numBucketS3DeleteFails;
-
   private @Metric MutableCounterLong numListMultipartUploadFails;
   private @Metric MutableCounterLong numListMultipartUploads;
 
   // Metrics related to OM Trash.
   private @Metric MutableCounterLong numTrashRenames;
   private @Metric MutableCounterLong numTrashDeletes;
   private @Metric MutableCounterLong numTrashListStatus;
-  private @Metric MutableCounterLong numTrashListKeys;
-  private @Metric MutableCounterLong numTrashGetFileStatus;

Review Comment:
   Please hold off removing `numTrashGetFileStatus` until https://github.com/apache/ozone/pull/11364 is resolved. This metric should technically be used for all `TrashOzoneFileSystem` usages. `numTrashListKeys` on the other hand might be able to be removed.
   
   cc: @yandrey321 



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16726. Remove unused metrics from OMMetrics [ozone]

Posted by "chungen0126 (via GitHub)" <gi...@apache.org>.
chungen0126 merged PR #11421:
URL: https://github.com/apache/ozone/pull/11421


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16726. Remove unused metrics from OMMetrics [ozone]

Posted by "ivandika3 (via GitHub)" <gi...@apache.org>.
ivandika3 commented on code in PR #11421:
URL: https://github.com/apache/ozone/pull/11421#discussion_r4226330665


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -222,34 +217,25 @@ public class OMMetrics implements OmMetadataReaderMetrics {
 
   private @Metric MutableGaugeLong numVolumes;
   private @Metric MutableGaugeLong numBuckets;
-  private @Metric MutableCounterLong numS3Buckets;
 
   //TODO: This metric is an estimate and it may be inaccurate on restart if the
   // OM process was not shutdown cleanly. Key creations/deletions in the last
   // few minutes before restart may not be included in this count.
   private @Metric MutableGaugeLong numKeys;
 
-  private @Metric MutableCounterLong numBucketS3Creates;
-  private @Metric MutableCounterLong numBucketS3CreateFails;
-  private @Metric MutableCounterLong numBucketS3Deletes;
-  private @Metric MutableCounterLong numBucketS3DeleteFails;
-
   private @Metric MutableCounterLong numListMultipartUploadFails;
   private @Metric MutableCounterLong numListMultipartUploads;
 
   // Metrics related to OM Trash.
   private @Metric MutableCounterLong numTrashRenames;
   private @Metric MutableCounterLong numTrashDeletes;
   private @Metric MutableCounterLong numTrashListStatus;
-  private @Metric MutableCounterLong numTrashListKeys;
-  private @Metric MutableCounterLong numTrashGetFileStatus;

Review Comment:
   Please don't remove this until https://github.com/apache/ozone/pull/11364 is resolved.
   
   cc: @yandrey321 



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16726. Remove unused metrics from OMMetrics [ozone]

Posted by "chungen0126 (via GitHub)" <gi...@apache.org>.
chungen0126 commented on code in PR #11421:
URL: https://github.com/apache/ozone/pull/11421#discussion_r4209422124


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -1331,16 +1263,6 @@ public long getNumGetServiceListFails() {
     return numGetServiceListFails.value();

Review Comment:
   Seems like this can be removed as well?



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########


Review Comment:
   Seems like this can be removed as well?



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16726. Remove unused metrics from OMMetrics [ozone]

Posted by "echonesis (via GitHub)" <gi...@apache.org>.
echonesis commented on code in PR #11421:
URL: https://github.com/apache/ozone/pull/11421#discussion_r4215464969


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -146,7 +143,6 @@ public class OMMetrics implements OmMetadataReaderMetrics {
   private @Metric MutableCounterLong numKeyCommitFails;
   private @Metric MutableCounterLong numBlockAllocationFails;
   private @Metric MutableCounterLong numGetServiceListFails;

Review Comment:
   Maybe we could remove it as well.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16726. Remove unused metrics from OMMetrics [ozone]

Posted by "ivandika3 (via GitHub)" <gi...@apache.org>.
ivandika3 commented on code in PR #11421:
URL: https://github.com/apache/ozone/pull/11421#discussion_r4226330665


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -222,34 +217,25 @@ public class OMMetrics implements OmMetadataReaderMetrics {
 
   private @Metric MutableGaugeLong numVolumes;
   private @Metric MutableGaugeLong numBuckets;
-  private @Metric MutableCounterLong numS3Buckets;
 
   //TODO: This metric is an estimate and it may be inaccurate on restart if the
   // OM process was not shutdown cleanly. Key creations/deletions in the last
   // few minutes before restart may not be included in this count.
   private @Metric MutableGaugeLong numKeys;
 
-  private @Metric MutableCounterLong numBucketS3Creates;
-  private @Metric MutableCounterLong numBucketS3CreateFails;
-  private @Metric MutableCounterLong numBucketS3Deletes;
-  private @Metric MutableCounterLong numBucketS3DeleteFails;
-
   private @Metric MutableCounterLong numListMultipartUploadFails;
   private @Metric MutableCounterLong numListMultipartUploads;
 
   // Metrics related to OM Trash.
   private @Metric MutableCounterLong numTrashRenames;
   private @Metric MutableCounterLong numTrashDeletes;
   private @Metric MutableCounterLong numTrashListStatus;
-  private @Metric MutableCounterLong numTrashListKeys;
-  private @Metric MutableCounterLong numTrashGetFileStatus;

Review Comment:
   Please don't remove `numTrashGetFileStatus` until https://github.com/apache/ozone/pull/11364 is resolved. This metric should technically be used for all `TrashOzoneFileSystem` usages.
   
   cc: @yandrey321 



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16726. Remove unused metrics from OMMetrics [ozone]

Posted by "ivandika3 (via GitHub)" <gi...@apache.org>.
ivandika3 commented on code in PR #11421:
URL: https://github.com/apache/ozone/pull/11421#discussion_r4226330665


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -222,34 +217,25 @@ public class OMMetrics implements OmMetadataReaderMetrics {
 
   private @Metric MutableGaugeLong numVolumes;
   private @Metric MutableGaugeLong numBuckets;
-  private @Metric MutableCounterLong numS3Buckets;
 
   //TODO: This metric is an estimate and it may be inaccurate on restart if the
   // OM process was not shutdown cleanly. Key creations/deletions in the last
   // few minutes before restart may not be included in this count.
   private @Metric MutableGaugeLong numKeys;
 
-  private @Metric MutableCounterLong numBucketS3Creates;
-  private @Metric MutableCounterLong numBucketS3CreateFails;
-  private @Metric MutableCounterLong numBucketS3Deletes;
-  private @Metric MutableCounterLong numBucketS3DeleteFails;
-
   private @Metric MutableCounterLong numListMultipartUploadFails;
   private @Metric MutableCounterLong numListMultipartUploads;
 
   // Metrics related to OM Trash.
   private @Metric MutableCounterLong numTrashRenames;
   private @Metric MutableCounterLong numTrashDeletes;
   private @Metric MutableCounterLong numTrashListStatus;
-  private @Metric MutableCounterLong numTrashListKeys;
-  private @Metric MutableCounterLong numTrashGetFileStatus;

Review Comment:
   Please hold off removing `numTrashGetFileStatus` until https://github.com/apache/ozone/pull/11364 is resolved. This metric should technically be used for all `TrashOzoneFileSystem` usages.
   
   cc: @yandrey321 



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16726. Remove unused metrics from OMMetrics [ozone]

Posted by "chihsuan (via GitHub)" <gi...@apache.org>.
chihsuan commented on code in PR #11421:
URL: https://github.com/apache/ozone/pull/11421#discussion_r4236178238


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -222,34 +217,25 @@ public class OMMetrics implements OmMetadataReaderMetrics {
 
   private @Metric MutableGaugeLong numVolumes;
   private @Metric MutableGaugeLong numBuckets;
-  private @Metric MutableCounterLong numS3Buckets;
 
   //TODO: This metric is an estimate and it may be inaccurate on restart if the
   // OM process was not shutdown cleanly. Key creations/deletions in the last
   // few minutes before restart may not be included in this count.
   private @Metric MutableGaugeLong numKeys;
 
-  private @Metric MutableCounterLong numBucketS3Creates;
-  private @Metric MutableCounterLong numBucketS3CreateFails;
-  private @Metric MutableCounterLong numBucketS3Deletes;
-  private @Metric MutableCounterLong numBucketS3DeleteFails;
-
   private @Metric MutableCounterLong numListMultipartUploadFails;
   private @Metric MutableCounterLong numListMultipartUploads;
 
   // Metrics related to OM Trash.
   private @Metric MutableCounterLong numTrashRenames;
   private @Metric MutableCounterLong numTrashDeletes;
   private @Metric MutableCounterLong numTrashListStatus;
-  private @Metric MutableCounterLong numTrashListKeys;
-  private @Metric MutableCounterLong numTrashGetFileStatus;

Review Comment:
   Thanks for catching this! 🙏  I kept `numTrashGetFileStatus` in 9b93de3f84. I also double-checked the other removed counters, and none seem to have a similar missing call site.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16726. Remove unused metrics from OMMetrics [ozone]

Posted by "chungen0126 (via GitHub)" <gi...@apache.org>.
chungen0126 commented on PR #11421:
URL: https://github.com/apache/ozone/pull/11421#issuecomment-6159229940

   Thanks @chihsuan for working on this, @echonesis @ivandika3 for the review.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-16726. Remove unused metrics from OMMetrics [ozone]

Posted by "chihsuan (via GitHub)" <gi...@apache.org>.
chihsuan commented on code in PR #11421:
URL: https://github.com/apache/ozone/pull/11421#discussion_r4217701620


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -1331,16 +1263,6 @@ public long getNumGetServiceListFails() {
     return numGetServiceListFails.value();

Review Comment:
   Good catch, removed in 4b20d31.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########


Review Comment:
   I originally left it for HDDS-16719, but agree it's unused. Removed in 4b20d31.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMetrics.java:
##########
@@ -146,7 +143,6 @@ public class OMMetrics implements OmMetadataReaderMetrics {
   private @Metric MutableCounterLong numKeyCommitFails;
   private @Metric MutableCounterLong numBlockAllocationFails;
   private @Metric MutableCounterLong numGetServiceListFails;

Review Comment:
   Thanks, removed in 4b20d31.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org