[jboss-cvs] JBoss Messaging SVN: r7045 - trunk/src/main/org/jboss/messaging/core/persistence/impl/journal.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue May 26 16:19:22 EDT 2009


Author: timfox
Date: 2009-05-26 16:19:21 -0400 (Tue, 26 May 2009)
New Revision: 7045

Modified:
   trunk/src/main/org/jboss/messaging/core/persistence/impl/journal/JournalStorageManager.java
Log:
fixed bug in id generator

Modified: trunk/src/main/org/jboss/messaging/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/persistence/impl/journal/JournalStorageManager.java	2009-05-26 19:31:05 UTC (rev 7044)
+++ trunk/src/main/org/jboss/messaging/core/persistence/impl/journal/JournalStorageManager.java	2009-05-26 20:19:21 UTC (rev 7045)
@@ -93,7 +93,7 @@
 {
    private static final Logger log = Logger.getLogger(JournalStorageManager.class);
 
-   private static final long CHECKPOINT_BATCH_SIZE = 2 ^ 32;
+   private static final long CHECKPOINT_BATCH_SIZE = Integer.MAX_VALUE;
 
    // Bindings journal record type
 
@@ -1077,11 +1077,11 @@
       private volatile long nextID;
 
       public BatchingIDGenerator(final long start, final long checkpointSize)
-      {
+      {         
          this.counter = new AtomicLong(start);
 
          this.checkpointSize = checkpointSize;
-
+         
          nextID = start + checkpointSize;
       }
 
@@ -1109,9 +1109,9 @@
       }
 
       private synchronized void saveCheckPoint(final long id)
-      {
+      {        
          if (id >= nextID)
-         {
+         {            
             storeID(id);
 
             nextID += checkpointSize;




More information about the jboss-cvs-commits mailing list