Github user nkalmar commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/510#discussion_r192668700
--- Diff:
src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java ---
@@ -320,6 +332,11 @@ public synchronized void commit() throws IOException {
long syncElapsedMS =
TimeUnit.NANOSECONDS.toMillis(System.nanoTime() -
startSyncNS);
if (syncElapsedMS > fsyncWarningThresholdMS) {
+ if(serverStats != null) {
+ serverStats.incrementFsyncThresholdExceedCount();
+ } else {
+ LOG.warn("fsyncWarningThresholdMS exceeded, but
serverStats not added in FileTxnLog!");
--- End diff --
Okay, sounds fair. I will remove it.
Thanks for pointing this out!
---