[hornetq-commits] JBoss hornetq SVN: r10212 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Feb 15 19:15:54 EST 2011


Author: clebert.suconic at jboss.com
Date: 2011-02-15 19:15:54 -0500 (Tue, 15 Feb 2011)
New Revision: 10212

Modified:
   branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/LargeServerMessageImpl.java
Log:
fixing tests / accidental commit

Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/LargeServerMessageImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/LargeServerMessageImpl.java	2011-02-16 00:07:02 UTC (rev 10211)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/LargeServerMessageImpl.java	2011-02-16 00:15:54 UTC (rev 10212)
@@ -173,7 +173,7 @@
             // This file is linked to another message, deleting the reference where it belongs on this case
             linkMessage.decrementDelayDeletionCount();
          }
-         else if (delayDeletionCount.get() <= 0)
+         else
          {
             if (LargeServerMessageImpl.isTrace)
             {
@@ -192,27 +192,18 @@
       }
    }
 
-   public int incrementRefCount() throws Exception
-   {
-      int value = super.incrementRefCount();
-
-//      new Exception("increment, value=" + value +
-//                    " on msgCount = " +
-//                    this.getIntProperty("counter-message") +
-//                    " messageID=" +
-//                    this.getMessageID()).printStackTrace();
-
-      return value;
-   }
-
-   static int deleted = 0;
-
    @Override
    public synchronized int decrementRefCount() throws Exception
    {
       int currentRefCount = super.decrementRefCount();
 
-      checkDelete();
+      // We use <= as this could be used by load.
+      // because of a failure, no references were loaded, so we have 0... and we still need to delete the associated
+      // files
+      if (delayDeletionCount.get() <= 0)
+      {
+         checkDelete();
+      }
 
       return currentRefCount;
    }
@@ -324,7 +315,7 @@
             file = storageManager.createFileForLargeMessage(getMessageID(), durable);
 
             file.open();
-
+            
             bodySize = file.size();
          }
       }



More information about the hornetq-commits mailing list