Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/567#discussion_r202363520
  
    --- Diff: 
src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java ---
    @@ -110,6 +124,18 @@
             if ((fsyncWarningThreshold = 
Long.getLong("zookeeper.fsync.warningthresholdms")) == null)
                 fsyncWarningThreshold = 
Long.getLong("fsync.warningthresholdms", 1000);
             fsyncWarningThresholdMS = fsyncWarningThreshold;
    +
    +        Long logSize = Long.getLong(LOG_SIZE_LIMIT, -1);
    +        if (logSize > 0) {
    +            // Convert to bytes
    +            logSize = logSize * 1024;
    +            if (logSize <= preAllocSize) {
    +                LOG.error("Ignoring invalid txn log size limit (lesser 
than preAllocSize)");
    +            } else {
    +                LOG.info(LOG_SIZE_LIMIT + "=" + logSize);
    --- End diff --
    
    Please indicate the unit in the message (you converted the value to bytes) 
and use log4j message formatter.


---

Reply via email to