activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r680161 - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/broker/region/Queue.java test/java/org/apache/activemq/bugs/AMQ1866.java
Date Sun, 27 Jul 2008 18:22:01 GMT
Author: rajdavies
Date: Sun Jul 27 11:22:01 2008
New Revision: 680161

URL: http://svn.apache.org/viewvc?rev=680161&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-1866

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1866.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=680161&r1=680160&r2=680161&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
Sun Jul 27 11:22:01 2008
@@ -1164,7 +1164,7 @@
                         // pick the least loaded to add the message too
                         for (Subscription s : targets) {
                             if (target == null
-                                    || target.getInFlightUsage() > s.getInFlightUsage())
{
+                                    || target.getPendingQueueSize() > s.getPendingQueueSize())
{
                                 target = s;
                             }
                         }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1866.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1866.java?rev=680161&r1=680160&r2=680161&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1866.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ1866.java Sun Jul
27 11:22:01 2008
@@ -33,6 +33,7 @@
 import org.apache.activemq.broker.region.policy.PolicyEntry;
 import org.apache.activemq.broker.region.policy.PolicyMap;
 import org.apache.activemq.command.ActiveMQQueue;
+import org.apache.activemq.store.amq.AMQPersistenceAdapter;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -60,6 +61,9 @@
     protected void setUp() throws Exception {
         // Start an embedded broker up.
         brokerService = new BrokerService();
+        AMQPersistenceAdapter adaptor = new AMQPersistenceAdapter();
+        adaptor.setIndexBinSize(4096);
+        brokerService.setPersistenceAdapter(adaptor);
         brokerService.deleteAllMessages();
         
         // A small max page size makes this issue occur faster.



Mime
View raw message