From b37b9eb5afed8261f657b5847e8691b3804d0f60 Mon Sep 17 00:00:00 2001 From: gtully Date: Fri, 19 Aug 2016 11:48:42 +0100 Subject: [PATCH] fix up cancelledTaskModMetric reporting in kahadb --- .../main/java/org/apache/activemq/store/kahadb/KahaDBStore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java index 0d20b78e33..f2ba0de9d7 100644 --- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java +++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java @@ -1413,7 +1413,7 @@ public class KahaDBStore extends MessageDatabase implements PersistenceAdapter { this.store.addMessage(context, message); removeQueueTask(this.store, this.message.getMessageId()); this.future.complete(); - } else if (cancelledTaskModMetric > 0 && this.store.canceledTasks++ % cancelledTaskModMetric == 0) { + } else if (cancelledTaskModMetric > 0 && (++this.store.canceledTasks) % cancelledTaskModMetric == 0) { System.err.println(this.store.dest.getName() + " cancelled: " + (this.store.canceledTasks / this.store.doneTasks) * 100); this.store.canceledTasks = this.store.doneTasks = 0;