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 2021/11/10 13:59:20 UTC

[GitHub] [rocketmq] HScarb commented on a change in pull request #3478: [ISSUE #3473] Optimize the problem of delayed message delivery duplication

HScarb commented on a change in pull request #3478:
URL: https://github.com/apache/rocketmq/pull/3478#discussion_r746612812



##########
File path: store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java
##########
@@ -317,7 +318,7 @@ public void executeOnTimeup() {
                         long nextOffset = offset;
                         int i = 0;
                         ConsumeQueueExt.CqExtUnit cqExtUnit = new ConsumeQueueExt.CqExtUnit();
-                        for (; i < bufferCQ.getSize(); i += ConsumeQueue.CQ_STORE_UNIT_SIZE) {
+                        for (; i < bufferCQ.getSize() && isStarted(); i += ConsumeQueue.CQ_STORE_UNIT_SIZE) {

Review comment:
       `executeOnTimeup()` method will only invoke in `run()` method, which already has the condition of `isStarted()`, so why add a `isStarted()` here
   https://github.com/apache/rocketmq/pull/3478/files#diff-350d772aa64ef5e5f5012863595bc2e9d35c731fbba75a81b823cf00b1a2d593R281-R282




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