From cf723ad4e4dc6f2d57e123e5fe1485a191f27597 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