activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1162063 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java
Date Fri, 26 Aug 2011 11:12:37 GMT
Author: dejanb
Date: Fri Aug 26 11:12:36 2011
New Revision: 1162063

URL: http://svn.apache.org/viewvc?rev=1162063&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3474 - flush only if we have some non-persistent
messages

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java?rev=1162063&r1=1162062&r2=1162063&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/cursors/FilePendingMessageCursor.java
Fri Aug 26 11:12:36 2011
@@ -380,7 +380,7 @@ public class FilePendingMessageCursor ex
     public void onUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage) {
         if (newPercentUsage >= getMemoryUsageHighWaterMark()) {
             synchronized (this) {
-                if (!flushRequired) {
+                if (!flushRequired && size() != 0) {
                     flushRequired =true;
                     if (!iterating) {
                         expireOldMessages();



Mime
View raw message