RongtongJin commented on code in PR #7082:
URL: https://github.com/apache/rocketmq/pull/7082#discussion_r1278516420


##########
broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java:
##########
@@ -988,7 +988,15 @@ private RemotingCommand 
rewriteRequestForStaticTopic(SearchOffsetRequestHeader r
                     continue;
                 }
                 if (mappingDetail.getBname().equals(item.getBname())) {
-                    offset = 
this.brokerController.getMessageStore().getOffsetInQueueByTime(mappingContext.getTopic(),
 item.getQueueId(), timestamp);
+                    MessageStore messageStore = 
this.brokerController.getMessageStore();
+                    if (messageStore instanceof DefaultMessageStore) {
+                        // get offset with specific boundary type
+                        offset = ((DefaultMessageStore) 
messageStore).getOffsetInQueueByTime(requestHeader.getTopic(),
+                                requestHeader.getQueueId(), 
requestHeader.getTimestamp(), requestHeader.getBoundaryType());
+                    } else {
+                        offset = 
messageStore.getOffsetInQueueByTime(requestHeader.getTopic(), 
requestHeader.getQueueId(),
+                                requestHeader.getTimestamp());
+                    }

Review Comment:
   I think it would be better to unify the two enumeration classes.



-- 
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

Reply via email to