Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/501#discussion_r184673319
  
    --- Diff: 
src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java ---
    @@ -311,6 +325,9 @@ public synchronized void commit() throws IOException {
     
                     syncElapsedMS = 
TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startSyncNS);
                     if (syncElapsedMS > fsyncWarningThresholdMS) {
    +                    if(serverStats != null) {
    +                        serverStats.incrementFsyncThresholdExceedCount();
    +                    }
    --- End diff --
    
    @nkalmar I wonder if we could add an 'else' branch here with a `LOG.warn()` 
message indicating that something had gone wrong and Zk was unable to track 
fsync warnings. What do you think?


---

Reply via email to