ShannonDing commented on code in PR #4655:
URL: https://github.com/apache/rocketmq/pull/4655#discussion_r940364353


##########
broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java:
##########
@@ -398,7 +398,12 @@ public void run() {
             } catch (Exception e) {
                 // XXX: warn and notify me
                 log.error("ScheduleMessageService, executeOnTimeup exception", 
e);
-                this.scheduleNextTimerTask(this.offset, DELAY_FOR_A_PERIOD);
+                try {
+                    // Wait for a period of time if an error has occurred.
+                    TimeUnit.MILLISECONDS.sleep(DELAY_FOR_A_PERIOD);
+                } catch (InterruptedException ignored) {
+                    // ignored

Review Comment:
   it is better print the log here, although the process may not come 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to