From 7c7374e38c0c1d6e8ee9d704717b2c94b7170a61 Mon Sep 17 00:00:00 2001 From: Li Zhanhui Date: Thu, 6 Apr 2017 16:43:52 +0800 Subject: [PATCH] Fix issue 165 --- .../java/org/apache/rocketmq/store/DefaultMessageStore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java b/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java index 5c2d27f1..0edfeec4 100644 --- a/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java +++ b/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java @@ -462,7 +462,7 @@ public class DefaultMessageStore implements MessageStore { long maxPhyOffsetPulling = 0; int i = 0; - final int maxFilterMessageCount = 16000; + final int maxFilterMessageCount = Math.max(16000, maxMsgNums * ConsumeQueue.CQ_STORE_UNIT_SIZE); final boolean diskFallRecorded = this.messageStoreConfig.isDiskFallRecorded(); for (; i < bufferConsumeQueue.getSize() && i < maxFilterMessageCount; i += ConsumeQueue.CQ_STORE_UNIT_SIZE) { long offsetPy = bufferConsumeQueue.getByteBuffer().getLong(); -- GitLab