zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nkalmar <...@git.apache.org>
Subject [GitHub] zookeeper pull request #510: ZOOKEEPER-3019 add metric for slow fsyncs count
Date Mon, 04 Jun 2018 08:54:54 GMT
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!


---

Mime
View raw message