Author: borges
Date: 2011-11-08 10:17:39 -0500 (Tue, 08 Nov 2011)
New Revision: 11667
Modified:
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java
Log:
HORNETQ-720 Also during replication, ensure minimum files during loading
Modified:
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java
===================================================================
---
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java 2011-11-08
00:45:05 UTC (rev 11666)
+++
trunk/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java 2011-11-08
15:17:39 UTC (rev 11667)
@@ -2008,6 +2008,7 @@
if (replicationSync)
{
assert filesRepository.getDataFiles().isEmpty();
+ filesRepository.ensureMinFiles();
setJournalState(JournalState.SYNCING);
return new JournalLoadInformation(0, -1);
}
@@ -3081,13 +3082,11 @@
{
if (!currentFile.getFile().isOpen())
currentFile.getFile().open();
-
currentFile.getFile().position(currentFile.getFile().calculateBlockStart(lastDataPos));
}
else
{
currentFile = filesRepository.getFreeFile();
-
filesRepository.openFile(currentFile, true);
}