This is an automated email from the ASF dual-hosted git repository.
jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new 6091968907 [ISSUE #8124] Avoid scheduled tasks exiting because of
unknown exceptions
6091968907 is described below
commit 609196890765b89116e12745279d287b91eae2ee
Author: Colin Lee <[email protected]>
AuthorDate: Mon May 13 17:29:51 2024 +0800
[ISSUE #8124] Avoid scheduled tasks exiting because of unknown exceptions
Signed-off-by: Colin Lee <[email protected]>
Co-authored-by: lirui <[email protected]>
---
.../org/apache/rocketmq/broker/schedule/ScheduleMessageService.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java
b/broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java
index ef7e4f6789..e13b36df91 100644
---
a/broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java
+++
b/broker/src/main/java/org/apache/rocketmq/broker/schedule/ScheduleMessageService.java
@@ -224,7 +224,7 @@ public class ScheduleMessageService extends ConfigManager {
result = result && this.correctDelayOffset();
return result;
}
-
+
public boolean loadWhenSyncDelayOffset() {
boolean result = super.load();
result = result && this.parseDelayLevel();
@@ -377,7 +377,7 @@ public class ScheduleMessageService extends ConfigManager {
if (isStarted()) {
this.executeOnTimeUp();
}
- } catch (Exception e) {
+ } catch (Throwable e) {
// XXX: warn and notify me
log.error("ScheduleMessageService, executeOnTimeUp exception",
e);
this.scheduleNextTimerTask(this.offset, DELAY_FOR_A_PERIOD);