zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phunt <...@git.apache.org>
Subject [GitHub] zookeeper pull request #296: ZOOKEEPER-2824: `FileChannel#size` info should ...
Date Fri, 19 Jan 2018 00:34:55 GMT
Github user phunt commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/296#discussion_r162510193
  
    --- Diff: src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java ---
    @@ -332,11 +333,13 @@ public synchronized void commit() throws IOException {
                 if (forceSync) {
                     long startSyncNS = System.nanoTime();
     
    -                log.getChannel().force(false);
    +                FileChannel channel = log.getChannel();
    +                channel.force(false);
     
                     syncElapsedMS = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startSyncNS);
                     if (syncElapsedMS > fsyncWarningThresholdMS) {
    -                    LOG.warn("fsync-ing the write ahead log in "
    +                    LOG.warn("fsync-ing the write ahead log ("
    +                            + channel.size() + " bytes) in "
    --- End diff --
    
    @asdf2014 can you move the changed text after the first sentence?
    
    ... latency. File size is ### bytes. See ...
    
    The reason being that I know a number of users who have log triggers on this log message
and I'd like to minimize the impact as much as possible.


---

Mime
View raw message