LetLetMe commented on code in PR #8896: URL: https://github.com/apache/rocketmq/pull/8896#discussion_r1832098971
########## store/src/main/java/org/apache/rocketmq/store/queue/RocksDBConsumeQueueStore.java: ########## @@ -343,7 +344,24 @@ public ByteBuffer get(final String topic, final int queueId, final long cqOffset */ @Override public void recoverOffsetTable(long minPhyOffset) { - + try { + ConcurrentMap<String, Long> cqOffsetTable = new ConcurrentHashMap<>(1024); + ConcurrentMap<String, TopicConfig> configs = this.messageStore.getTopicConfigs(); + for (TopicConfig topicConfig : configs.values()) { + for (int queueId = 0; queueId < topicConfig.getWriteQueueNums(); queueId++) { + String key = topicConfig.getTopicName() + "-" + queueId; + Long maxOffset = this.rocksDBConsumeQueueOffsetTable.getMaxCqOffset(topicConfig.getTopicName(), queueId); + if (maxOffset != null) { + long maxOffsetInQueue = maxOffset + 1; Review Comment: getMaxCqOffset -> The highest queueOffset that has been persisted getMaxOffsetInQueue -> The next available queueOffset after the latest message ![image](https://github.com/user-attachments/assets/0c203a60-dae1-465f-8242-5f92f506f5ed) -- 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: commits-unsubscr...@rocketmq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org