Author: clebert.suconic(a)jboss.com
Date: 2011-11-01 19:56:50 -0400 (Tue, 01 Nov 2011)
New Revision: 11627
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/LargeServerMessageImpl.java
Log:
Fixing delete issue on LargeMessageTest (it was failing intermittently)
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
---
branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-11-01
21:09:46 UTC (rev 11626)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-11-01
23:56:50 UTC (rev 11627)
@@ -1275,11 +1275,11 @@
log.info("Deleting unreferenced message id=" + msg.getMessageID() +
" from the journal");
try
{
- deleteMessage(msg.getMessageID());
+ deleteMessage(msg.getMessageID());
}
catch (Exception ignored)
{
- log.warn("It wasn't possible to delete message " +
msg.getMessageID());
+ log.warn("It wasn't possible to delete message " +
msg.getMessageID(), ignored);
}
}
}
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-11-01
21:09:46 UTC (rev 11626)
+++
branches/Branch_2_2_EAP/src/main/org/hornetq/core/persistence/impl/journal/LargeServerMessageImpl.java 2011-11-01
23:56:50 UTC (rev 11627)
@@ -170,11 +170,21 @@
public synchronized void incrementDelayDeletionCount()
{
delayDeletionCount.incrementAndGet();
+ try
+ {
+ incrementRefCount();
+ }
+ catch (Exception e)
+ {
+ log.warn(e.getMessage(), e);
+ }
}
public synchronized void decrementDelayDeletionCount() throws Exception
{
int count = delayDeletionCount.decrementAndGet();
+
+ decrementRefCount();
if (count == 0)
{
Show replies by date