diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java index b2980b3e6a..d94d197e1d 100644 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java @@ -268,6 +268,8 @@ public class AsyncDataManager { String fileName = filePrefix + nextNum; File file = new File(directory, fileName); DataFile nextWriteFile = new DataFile(file, nextNum, preferedFileLength); + //actually allocate the disk space + nextWriteFile.closeRandomAccessFile(nextWriteFile.openRandomAccessFile(true)); fileMap.put(nextWriteFile.getDataFileId(), nextWriteFile); fileByFileMap.put(file, nextWriteFile); if (currentWriteFile != null) {