activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r694771 - in /activemq/sandbox/kahadb/src: main/java/org/apache/kahadb/store/MessageDatabase.java test/resources/log4j.properties
Date Fri, 12 Sep 2008 18:38:38 GMT
Author: chirino
Date: Fri Sep 12 11:38:37 2008
New Revision: 694771

URL: http://svn.apache.org/viewvc?rev=694771&view=rev
Log:
Opps had a infinite while loop that was adding entries into an array.. Would blow out our
memory.
This would get triggered when a topic messages were about to get deleted.


Modified:
    activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/store/MessageDatabase.java
    activemq/sandbox/kahadb/src/test/resources/log4j.properties

Modified: activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/store/MessageDatabase.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/store/MessageDatabase.java?rev=694771&r1=694770&r2=694771&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/store/MessageDatabase.java (original)
+++ activemq/sandbox/kahadb/src/main/java/org/apache/kahadb/store/MessageDatabase.java Fri
Sep 12 11:38:37 2008
@@ -977,7 +977,7 @@
                         ArrayList<Entry<Long, MessageKeys>> deletes = new ArrayList<Entry<Long,
MessageKeys>>();
                         for (Iterator<Entry<Long, MessageKeys>> iterator = sd.orderIndex.iterator(tx);
iterator.hasNext();) {
                             Entry<Long, MessageKeys> entry = iterator.next();
-                            while (entry.getKey().compareTo(sequenceId) <= 0) {
+                            if (entry.getKey().compareTo(sequenceId) <= 0) {
                                 // We don't do the actually delete while we are
                                 // iterating the BTree since
                                 // iterating would fail.

Modified: activemq/sandbox/kahadb/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/activemq/sandbox/kahadb/src/test/resources/log4j.properties?rev=694771&r1=694770&r2=694771&view=diff
==============================================================================
--- activemq/sandbox/kahadb/src/test/resources/log4j.properties (original)
+++ activemq/sandbox/kahadb/src/test/resources/log4j.properties Fri Sep 12 11:38:37 2008
@@ -18,7 +18,7 @@
 #
 # The logging properties used during tests..
 #
-log4j.rootLogger=INFO, out
+log4j.rootLogger=INFO, stdout
 
 log4j.logger.org.apache.activemq.spring=WARN
 



Mime
View raw message