Author: clebert.suconic(a)jboss.com
Date: 2009-12-06 16:22:05 -0500 (Sun, 06 Dec 2009)
New Revision: 8600
Modified:
trunk/src/main/org/hornetq/core/journal/impl/JournalImpl.java
Log:
HORNETQ-237 - Fix for truncated files during crashes
Modified: trunk/src/main/org/hornetq/core/journal/impl/JournalImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/journal/impl/JournalImpl.java 2009-12-06 16:40:55 UTC
(rev 8599)
+++ trunk/src/main/org/hornetq/core/journal/impl/JournalImpl.java 2009-12-06 21:22:05 UTC
(rev 8600)
@@ -2923,6 +2923,7 @@
sequentialFile.writeDirect(bb, true);
}
+ long position = sequentialFile.position();
sequentialFile.close();
@@ -2930,7 +2931,6 @@
if (keepOpened)
{
-
if (multiAIO)
{
sequentialFile.open();
@@ -2939,6 +2939,7 @@
{
sequentialFile.open(1, false);
}
+ sequentialFile.position(position);
}
return new JournalFileImpl(sequentialFile, fileID);
Show replies by date