activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1325810 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
Date Fri, 13 Apr 2012 15:39:01 GMT
Author: gtully
Date: Fri Apr 13 15:39:01 2012
New Revision: 1325810

URL: http://svn.apache.org/viewvc?rev=1325810&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3806 - Partial index updates can lead to bogus recovery
for the vmcursor of a Q on startup. Only recovery destinations with that have some messages,
so the location index is the system or reference. It makes sense as the location index is
the basis for gc

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java?rev=1325810&r1=1325809&r2=1325810&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
Fri Apr 13 15:39:01 2012
@@ -364,7 +364,7 @@ public class Queue extends BaseDestinati
             messages.setUseCache(isUseCache());
             messages.setMemoryUsageHighWaterMark(getCursorMemoryHighWaterMark());
             final int messageCount = store.getMessageCount();
-            if (messages.isRecoveryRequired()) {
+            if (messageCount > 0 && messages.isRecoveryRequired()) {
                 BatchMessageRecoveryListener listener = new BatchMessageRecoveryListener(messageCount);
                 do {
                    listener.reset();



Mime
View raw message