zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anmolnar <...@git.apache.org>
Subject [GitHub] zookeeper pull request #307: ZOOKEEPER-2770 ZooKeeper slow operation log
Date Mon, 28 May 2018 14:11:30 GMT
Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/307#discussion_r191202289
  
    --- Diff: src/java/main/org/apache/zookeeper/server/ServerStats.java ---
    @@ -117,6 +138,11 @@ public String toString(){
             sb.append("Mode: " + getServerState() + "\n");
             return sb.toString();
         }
    +
    +    synchronized void incNumRequestsAboveThresholdTime() {
    +        numRequestsAboveThresholdTime++;
    --- End diff --
    
    Again, change the field to `AtomicLong` and you don't need to sync here.


---

Mime
View raw message