You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2010/07/07 06:14:18 UTC
svn commit: r961179 -
/activemq/sandbox/activemq-apollo-actor/activemq-hawtdb/src/main/scala/org/apache/activemq/broker/store/hawtdb/HawtDBClient.scala
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...