Git-Yang commented on a change in pull request #3478:
URL: https://github.com/apache/rocketmq/pull/3478#discussion_r746616707



##########
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:
       When we close the service, we cannot guarantee that it has been executed 
in this for loop.




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


Reply via email to