You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2021/02/17 01:43:48 UTC

[GitHub] [hadoop] tomscut commented on a change in pull request #2668: HDFS-15808. Add metrics for FSNamesystem read/write lock hold long time

tomscut commented on a change in pull request #2668:
URL: https://github.com/apache/hadoop/pull/2668#discussion_r577266767



##########
File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystemLock.java
##########
@@ -182,6 +192,7 @@ public void readUnlock(String opName,
     final long readLockIntervalMs =
         TimeUnit.NANOSECONDS.toMillis(readLockIntervalNanos);
     if (needReport && readLockIntervalMs >= this.readLockReportingThresholdMs) {
+      numReadLockLongHold.addAndGet(1);

Review comment:
       Thank you for your review and suggestion. Using incrementAndGet is a better way. I fixed it.




----------------------------------------------------------------
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:
users@infra.apache.org



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