lizhanhui commented on code in PR #8600:
URL: https://github.com/apache/rocketmq/pull/8600#discussion_r1758832686
##########
store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueue.java:
##########
@@ -311,7 +310,7 @@ public CqUnit getEarliestUnit() {
public CqUnit getLatestUnit() {
try {
long maxOffset =
this.messageStore.getQueueStore().getMaxOffsetInQueue(topic, queueId);
- return get(maxOffset);
+ return get(maxOffset > 0 ? maxOffset - 1 : maxOffset);
Review Comment:
Need a comment, explaining why maxOffset -1 makes sense here.
--
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]