Author: borges
Date: 2011-07-29 14:35:41 -0400 (Fri, 29 Jul 2011)
New Revision: 11071
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 Set value for the next file ID.
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-07-29
17:27:23 UTC (rev 11070)
+++
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalFilesRepository.java 2011-07-29
18:35:41 UTC (rev 11071)
@@ -536,6 +536,11 @@
return nextFileID.incrementAndGet();
}
+ public void setNextFileID(long value)
+ {
+ nextFileID.set(value);
+ }
+
/** Get the ID part of the name */
private long getFileNameID(final String fileName)
{
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-07-29
17:27:23 UTC (rev 11070)
+++
branches/HORNETQ-720_Replication/hornetq-journal/src/main/java/org/hornetq/core/journal/impl/JournalImpl.java 2011-07-29
18:35:41 UTC (rev 11071)
@@ -3282,6 +3282,10 @@
maxID = Math.max(maxID, id);
filesRepository.createRemoteBackupSyncFile(id);
}
+ if (maxID > 0)
+ {
+ filesRepository.setNextFileID(maxID);
+ }
}
finally
{
Show replies by date