activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r961179 - /activemq/sandbox/activemq-apollo-actor/activemq-hawtdb/src/main/scala/org/apache/activemq/broker/store/hawtdb/HawtDBClient.scala
Date Wed, 07 Jul 2010 04:14:18 GMT
Author: chirino
Date: Wed Jul  7 04:14:18 2010
New Revision: 961179

URL: http://svn.apache.org/viewvc?rev=961179&view=rev
Log:
Don't remove the queues while they are being iterated, the indexes are fail fast.

Modified:
    activemq/sandbox/activemq-apollo-actor/activemq-hawtdb/src/main/scala/org/apache/activemq/broker/store/hawtdb/HawtDBClient.scala

Modified: activemq/sandbox/activemq-apollo-actor/activemq-hawtdb/src/main/scala/org/apache/activemq/broker/store/hawtdb/HawtDBClient.scala
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-hawtdb/src/main/scala/org/apache/activemq/broker/store/hawtdb/HawtDBClient.scala?rev=961179&r1=961178&r2=961179&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-hawtdb/src/main/scala/org/apache/activemq/broker/store/hawtdb/HawtDBClient.scala
(original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-hawtdb/src/main/scala/org/apache/activemq/broker/store/hawtdb/HawtDBClient.scala
Wed Jul  7 04:14:18 2010
@@ -896,9 +896,13 @@ class HawtDBClient(hawtDBStore: HawtDBSt
 
       case x: Purge.Getter =>
         // Remove all the queues...
-        val queueKeys = queueIndex.iterator.map( _.getKey )
+        val queueKeys = ListBuffer[Long]()
+        queueIndex.iterator.foreach { entry =>
+          queueKeys += entry.getKey.longValue
+        }
+
         queueKeys.foreach { key =>
-          removeQueue(key.longValue)
+          removeQueue(key)
         }
 
         // Remove stored messages...



Mime
View raw message