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