ptlrs commented on code in PR #11085:
URL: https://github.com/apache/ozone/pull/11085#discussion_r3898975338


##########
hadoop-ozone/interface-storage/src/main/java/org/apache/hadoop/ozone/om/lock/OMLockMetrics.java:
##########
@@ -37,26 +36,24 @@ public final class OMLockMetrics implements MetricsSource {
   private static final String SOURCE_NAME =
       OMLockMetrics.class.getSimpleName();
 
-  private final MetricsRegistry registry;
-  private final MutableStat readLockWaitingTimeMsStat;
-  private final MutableStat readLockHeldTimeMsStat;
-  private final MutableStat writeLockWaitingTimeMsStat;
-  private final MutableStat writeLockHeldTimeMsStat;
+  private final ConcurrentMutableStat readLockWaitingTimeMsStat;
+  private final ConcurrentMutableStat readLockHeldTimeMsStat;
+  private final ConcurrentMutableStat writeLockWaitingTimeMsStat;
+  private final ConcurrentMutableStat writeLockHeldTimeMsStat;
 
   private OMLockMetrics() {
-    registry = new MetricsRegistry(SOURCE_NAME);
-    readLockWaitingTimeMsStat = registry.newStat("ReadLockWaitingTime",
+    readLockWaitingTimeMsStat = new 
ConcurrentMutableStat("ReadLockWaitingTime",
         "Time (in milliseconds) spent waiting for acquiring the read lock",
-        "Ops", "Time", true);
-    readLockHeldTimeMsStat = registry.newStat("ReadLockHeldTime",
+        "Ops", "Time", false);

Review Comment:
   @yandrey321 @jojochuang As per this transition of not collecting extended 
stats, we will now only know the count and averages. We won't know the min and 
max times that the read and write locks were held or waited upon. 
   
   Cases where the p99/p100 values are not sufficiently large to move the avg 
or p50 will be missed and difficult to track.
   
   Does this hinder future investigations where metrics for these values are 
needed or are there any alternatives to obtaining these values?



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