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.
---