lollipopjin commented on code in PR #8896:
URL: https://github.com/apache/rocketmq/pull/8896#discussion_r1832083197
##########
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:
Here means the begin offset for the new arrived message?
--
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]