[hornetq-commits] JBoss hornetq SVN: r9600 - branches/Branch_2_1/src/main/org/hornetq/core/journal/impl.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Aug 27 00:20:03 EDT 2010
Author: clebert.suconic at jboss.com
Date: 2010-08-27 00:20:03 -0400 (Fri, 27 Aug 2010)
New Revision: 9600
Modified:
branches/Branch_2_1/src/main/org/hornetq/core/journal/impl/FilesRepository.java
branches/Branch_2_1/src/main/org/hornetq/core/journal/impl/JournalImpl.java
branches/Branch_2_1/src/main/org/hornetq/core/journal/impl/NIOSequentialFile.java
Log:
https://jira.jboss.org/browse/HORNETQ-485 Improvements on compacting and file management on the journal
Modified: branches/Branch_2_1/src/main/org/hornetq/core/journal/impl/FilesRepository.java
===================================================================
--- branches/Branch_2_1/src/main/org/hornetq/core/journal/impl/FilesRepository.java 2010-08-26 21:11:42 UTC (rev 9599)
+++ branches/Branch_2_1/src/main/org/hornetq/core/journal/impl/FilesRepository.java 2010-08-27 04:20:03 UTC (rev 9600)
@@ -114,10 +114,21 @@
{
dataFiles.clear();
- pendingCloseFiles.clear();
+ drainClosedFiles();
freeFiles.clear();
+ for (JournalFile file : openedFiles)
+ {
+ try
+ {
+ file.getFile().close();
+ }
+ catch (Exception e)
+ {
+ log.warn(e.getMessage(), e);
+ }
+ }
openedFiles.clear();
}
Modified: branches/Branch_2_1/src/main/org/hornetq/core/journal/impl/JournalImpl.java
===================================================================
--- branches/Branch_2_1/src/main/org/hornetq/core/journal/impl/JournalImpl.java 2010-08-26 21:11:42 UTC (rev 9599)
+++ branches/Branch_2_1/src/main/org/hornetq/core/journal/impl/JournalImpl.java 2010-08-27 04:20:03 UTC (rev 9600)
@@ -2459,11 +2459,11 @@
filesRepository.drainClosedFiles();
+ filesRepository.clear();
+
fileFactory.stop();
currentFile = null;
-
- filesRepository.clear();
}
finally
{
Modified: branches/Branch_2_1/src/main/org/hornetq/core/journal/impl/NIOSequentialFile.java
===================================================================
--- branches/Branch_2_1/src/main/org/hornetq/core/journal/impl/NIOSequentialFile.java 2010-08-26 21:11:42 UTC (rev 9599)
+++ branches/Branch_2_1/src/main/org/hornetq/core/journal/impl/NIOSequentialFile.java 2010-08-27 04:20:03 UTC (rev 9600)
@@ -140,7 +140,7 @@
@Override
public synchronized void close() throws Exception
{
- super.close();
+ super.close();
if (maxIOSemaphore != null)
{
More information about the hornetq-commits
mailing list