Github user afine commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/436#discussion_r158392075
--- Diff: src/java/main/org/apache/zookeeper/server/persistence/Util.java
---
@@ -211,7 +211,7 @@ public static long padLogFile(FileOutputStream f,long
currentSize,
long preAllocSize) throws IOException{
long position = f.getChannel().position();
if (position + 4096 >= currentSize) {
- currentSize = currentSize + preAllocSize;
+ currentSize = position + preAllocSize;
--- End diff --
Fixed
---