You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/09/23 03:06:58 UTC
[GitHub] [rocketmq] HScarb commented on a diff in pull request #5171: fix bug for issue #5162
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org