From f65acf552bbc15aeb68b8fbd331600aefd895dae Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Fri, 17 Nov 2006 17:30:53 +0000 Subject: [PATCH] force the datafile before it is removed so that all async writes are completed before the file handle is closed. git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@476225 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/activemq/kaha/impl/data/DataManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataManager.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataManager.java index 75f041dee2..e97daf8a06 100644 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataManager.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/data/DataManager.java @@ -259,6 +259,7 @@ public final class DataManager{ private void removeDataFile(DataFile dataFile) throws IOException{ fileMap.remove(dataFile.getNumber()); + writer.force(dataFile); boolean result=dataFile.delete(); log.debug("discarding data file "+dataFile+(result?"successful ":"failed")); }