zookeeper-dev mailing list archives

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

    https://github.com/apache/zookeeper/pull/296#discussion_r164878614
  
    --- 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 as soon as @phunt's comment is addressed I can merge this in.


---

Mime
View raw message