zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asdf2014 <...@git.apache.org>
Subject [GitHub] zookeeper pull request #296: ZOOKEEPER-2824: `FileChannel#size` info should ...
Date Fri, 30 Jun 2017 01:56:41 GMT
Github user asdf2014 commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/296#discussion_r124950647
  
    --- 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 --
    
    @afine Thank you for code review. When we got the warn message, will confuse that reason
is `too large log` or `too busy disk I/O`? So, need to show the size of log to eliminate the
`too large log` possibility.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message