HScarb commented on code in PR #5171:
URL: https://github.com/apache/rocketmq/pull/5171#discussion_r978234596
##########
store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:
##########
@@ -764,7 +764,7 @@ public GetMessageResult getMessage(final String group,
final String topic, final
boolean isInDisk =
checkInDiskByCommitOffset(offsetPy, maxOffsetPy);
- if (cqUnit.getQueueOffset() - offset >
maxFilterMessageCount) {
+ if ((cqUnit.getQueueOffset() - offset) *
ConsumeQueue.CQ_STORE_UNIT_SIZE > maxFilterMessageCount) {
Review Comment:
IMO, it's better to modify `maxFilterMessageCount` like this
```java
final int maxFilterMessageCount = Math.max(800 /* 16000 / 20 */, maxMsgNums);
```
There are 2 kinds of ConsumeQueue in RocketMQ 5.0
`ConsumeQueue` which unit size is 20, and `BatchConsumeQueue` which unit
size is 46.
`(cqUnit.getQueueOffset() - offset) * ConsumeQueue.CQ_STORE_UNIT_SIZE` may
be confused
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]