Author: borges
Date: 2011-08-09 06:31:56 -0400 (Tue, 09 Aug 2011)
New Revision: 11162
Modified:
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalFilesRepository.java
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java
Log:
HORNETQ-720 Initialize contents of "current" journal file used in replicating
backup server.
Modified:
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalFilesRepository.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalFilesRepository.java 2011-08-09
10:31:20 UTC (rev 11161)
+++
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalFilesRepository.java 2011-08-09
10:31:56 UTC (rev 11162)
@@ -443,9 +443,9 @@
return nextFile;
}
- public JournalFile createRemoteBackupSyncFile(long fileID) throws Exception
+ public JournalFile createRemoteBackupSyncFile(long fileID, boolean init) throws
Exception
{
- return createFile(false, false, false, false, fileID);
+ return createFile(false, false, init, false, fileID);
}
// Package protected ---------------------------------------------
Modified:
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java 2011-08-09
10:31:20 UTC (rev 11161)
+++
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java 2011-08-09
10:31:56 UTC (rev 11162)
@@ -3128,11 +3128,11 @@
for (long id : fileIds)
{
maxID = Math.max(maxID, id);
- map.put(Long.valueOf(id), filesRepository.createRemoteBackupSyncFile(id));
+ map.put(Long.valueOf(id), filesRepository.createRemoteBackupSyncFile(id,
false));
}
maxID += 1;
filesRepository.setNextFileID(maxID);
- return filesRepository.createRemoteBackupSyncFile(maxID);
+ return filesRepository.createRemoteBackupSyncFile(maxID, true);
}
finally
{
Show replies by date