Author: clebert.suconic(a)jboss.com
Date: 2012-02-06 22:21:15 -0500 (Mon, 06 Feb 2012)
New Revision: 12092
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/QueueImpl.java
Log:
HORNETQ-843 - fixing paging
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
---
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/QueueImpl.java 2012-02-07
03:20:35 UTC (rev 12091)
+++
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/QueueImpl.java 2012-02-07
03:21:15 UTC (rev 12092)
@@ -1223,8 +1223,10 @@
try
{
boolean expired = false;
+ boolean hasElements = false;
while (iter.hasNext())
{
+ hasElements = true;
MessageReference ref = iter.next();
try
{
@@ -1243,7 +1245,8 @@
}
}
- if (expired && pageIterator != null &&
pageIterator.hasNext())
+ // If empty we need to schedule depaging to make sure we would depage
expired messages as well
+ if ((!hasElements || expired && pageIterator != null)
&& pageIterator.hasNext())
{
scheduleDepage();
}
Show replies by date