提交 9ad9ad06 编写于 作者: Y yukon

[ROCKETMQ-238] Catch Throwable to avoid error cancel some key scheduled tasks.

上级 b70b6800
...@@ -296,7 +296,7 @@ public class BrokerController { ...@@ -296,7 +296,7 @@ public class BrokerController {
public void run() { public void run() {
try { try {
BrokerController.this.protectBroker(); BrokerController.this.protectBroker();
} catch (Exception e) { } catch (Throwable e) {
log.error("protectBroker error.", e); log.error("protectBroker error.", e);
} }
} }
...@@ -307,7 +307,7 @@ public class BrokerController { ...@@ -307,7 +307,7 @@ public class BrokerController {
public void run() { public void run() {
try { try {
BrokerController.this.printWaterMark(); BrokerController.this.printWaterMark();
} catch (Exception e) { } catch (Throwable e) {
log.error("printWaterMark error.", e); log.error("printWaterMark error.", e);
} }
} }
......
...@@ -45,8 +45,8 @@ public class ClientHousekeepingService implements ChannelEventListener { ...@@ -45,8 +45,8 @@ public class ClientHousekeepingService implements ChannelEventListener {
public void run() { public void run() {
try { try {
ClientHousekeepingService.this.scanExceptionChannel(); ClientHousekeepingService.this.scanExceptionChannel();
} catch (Exception e) { } catch (Throwable e) {
log.error("", e); log.error("Error occurred when scan not active client channels.", e);
} }
} }
}, 1000 * 10, 1000 * 10, TimeUnit.MILLISECONDS); }, 1000 * 10, 1000 * 10, TimeUnit.MILLISECONDS);
......
...@@ -166,7 +166,7 @@ public class NettyRemotingClient extends NettyRemotingAbstract implements Remoti ...@@ -166,7 +166,7 @@ public class NettyRemotingClient extends NettyRemotingAbstract implements Remoti
public void run() { public void run() {
try { try {
NettyRemotingClient.this.scanResponseTable(); NettyRemotingClient.this.scanResponseTable();
} catch (Exception e) { } catch (Throwable e) {
log.error("scanResponseTable exception", e); log.error("scanResponseTable exception", e);
} }
} }
......
...@@ -195,7 +195,7 @@ public class NettyRemotingServer extends NettyRemotingAbstract implements Remoti ...@@ -195,7 +195,7 @@ public class NettyRemotingServer extends NettyRemotingAbstract implements Remoti
public void run() { public void run() {
try { try {
NettyRemotingServer.this.scanResponseTable(); NettyRemotingServer.this.scanResponseTable();
} catch (Exception e) { } catch (Throwable e) {
log.error("scanResponseTable exception", e); log.error("scanResponseTable exception", e);
} }
} }
......
...@@ -1443,7 +1443,7 @@ public class DefaultMessageStore implements MessageStore { ...@@ -1443,7 +1443,7 @@ public class DefaultMessageStore implements MessageStore {
this.deleteExpiredFiles(); this.deleteExpiredFiles();
this.redeleteHangedFile(); this.redeleteHangedFile();
} catch (Exception e) { } catch (Throwable e) {
DefaultMessageStore.log.warn(this.getServiceName() + " service has exception. ", e); DefaultMessageStore.log.warn(this.getServiceName() + " service has exception. ", e);
} }
} }
...@@ -1583,7 +1583,7 @@ public class DefaultMessageStore implements MessageStore { ...@@ -1583,7 +1583,7 @@ public class DefaultMessageStore implements MessageStore {
public void run() { public void run() {
try { try {
this.deleteExpiredFiles(); this.deleteExpiredFiles();
} catch (Exception e) { } catch (Throwable e) {
DefaultMessageStore.log.warn(this.getServiceName() + " service has exception. ", e); DefaultMessageStore.log.warn(this.getServiceName() + " service has exception. ", e);
} }
} }
......
...@@ -121,7 +121,7 @@ public class ScheduleMessageService extends ConfigManager { ...@@ -121,7 +121,7 @@ public class ScheduleMessageService extends ConfigManager {
public void run() { public void run() {
try { try {
ScheduleMessageService.this.persist(); ScheduleMessageService.this.persist();
} catch (Exception e) { } catch (Throwable e) {
log.error("scheduleAtFixedRate flush exception", e); log.error("scheduleAtFixedRate flush exception", e);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册