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
This commit is contained in:
Hiram R. Chirino 2006-11-17 17:30:53 +00:00
parent 57a4071d94
commit f65acf552b
1 changed files with 1 additions and 0 deletions

View File

@ -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"));
}