mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-3474 - flush only if we have some non-persistent messages
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1162063 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
86dc4d5c34
commit
4f50d25a22
|
@ -380,7 +380,7 @@ public class FilePendingMessageCursor extends AbstractPendingMessageCursor imple
|
||||||
public void onUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage) {
|
public void onUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage) {
|
||||||
if (newPercentUsage >= getMemoryUsageHighWaterMark()) {
|
if (newPercentUsage >= getMemoryUsageHighWaterMark()) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (!flushRequired) {
|
if (!flushRequired && size() != 0) {
|
||||||
flushRequired =true;
|
flushRequired =true;
|
||||||
if (!iterating) {
|
if (!iterating) {
|
||||||
expireOldMessages();
|
expireOldMessages();
|
||||||
|
|
Loading…
Reference in New Issue