activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r986264 - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/store/kahadb/KahaDBStore.java test/java/org/apache/activemq/bugs/AMQ2149KahaDBTest.java
Date Tue, 17 Aug 2010 11:10:15 GMT
Author: gtully
Date: Tue Aug 17 11:10:14 2010
New Revision: 986264

URL: http://svn.apache.org/viewvc?rev=986264&view=rev
Log:
follow on from resolution to test case, disable concurrentStoreAndDispatchTopics by default
as it can lead to the store and cursor getting out of order and when the cache is exhausted,
messages can potentially be missed. https://issues.apache.org/activemq/browse/AMQ-2864

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2149KahaDBTest.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java?rev=986264&r1=986263&r2=986264&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
Tue Aug 17 11:10:14 2010
@@ -105,7 +105,9 @@ public class KahaDBStore extends Message
     Semaphore globalQueueSemaphore;
     Semaphore globalTopicSemaphore;
     private boolean concurrentStoreAndDispatchQueues = true;
-    private boolean concurrentStoreAndDispatchTopics = true;
+    // when true, message order may be compromised when cache is exhausted if store is out
+    // or order w.r.t cache
+    private boolean concurrentStoreAndDispatchTopics = false;
     private boolean concurrentStoreAndDispatchTransactions = false;
     private int maxAsyncJobs = MAX_ASYNC_JOBS;
     private final KahaDBTransactionStore transactionStore;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2149KahaDBTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2149KahaDBTest.java?rev=986264&r1=986263&r2=986264&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2149KahaDBTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2149KahaDBTest.java
Tue Aug 17 11:10:14 2010
@@ -17,14 +17,11 @@
 package org.apache.activemq.bugs;
 
 import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter;
 
 public class AMQ2149KahaDBTest extends AMQ2149Test {
 
     @Override
     protected void configurePersistenceAdapter(BrokerService brokerService) throws Exception
{
-        // nothing to do as kahaDB is now the default
-        KahaDBPersistenceAdapter kahaDB = (KahaDBPersistenceAdapter) brokerService.getPersistenceAdapter();
-        kahaDB.setConcurrentStoreAndDispatchTopics(false);
+        // nothing to do as kahaDB is now the default and concurrent store and dispatch topics
defaults to false
     }
 }



Mime
View raw message