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 #501: ZOOKEEPER-3019 add metric for slow fsyncs count
Date Fri, 27 Apr 2018 12:33:39 GMT
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?


---

Mime
View raw message