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/08/07 12:28:39 UTC

[GitHub] [rocketmq] WJL3333 commented on a change in pull request #3226: [ISSUE #3229] check running status when schedule new DeliveryMessageTimerTask.

WJL3333 commented on a change in pull request #3226:
URL: https://github.com/apache/rocketmq/pull/3226#discussion_r684627197



##########
File path: store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java
##########
@@ -260,6 +260,16 @@ private long correctDeliverTimestamp(final long now, final long deliverTimestamp
             return result;
         }
 
+        private void scheduleNextDeliverTask(long nextOffset, long countdown) {
+            if (ScheduleMessageService.this.isStarted()) {

Review comment:
       thanks for reply. please check issue #3229 which provide some stack trace log.
   
   if one thread call shutdown ScheduleMessageService. the timer will be canceled.
   
   and at the same time when the timer running in `executeOnTimeup` method. (which may cost a long time)
   the latter thread may also schedule a new DeliverDelayedMessageTimerTask to run another round.
   but the current code not check the timer status. and we got an IllegalStateException here.




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