Skip to content

Commit 8ac9492

Browse files
authored
Fix SHOW BACKENDS return ERROR (#320)
In some case, errMsg in Backend maybe null. we change it when check it nut null Issue: #317
1 parent f1b6735 commit 8ac9492

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎fe/src/main/java/org/apache/doris/system/Backend.java‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,11 @@ public void setBad(EventBus eventBus, String errMsg) {
212212
}
213213

214214
eventBus.post(new BackendEvent(BackendEventType.BACKEND_DOWN, "missing heartbeat", Long.valueOf(id)));
215-
heartbeatErrMsg = errMsg;
215+
// In some case, errMsg is null when catched Exception have no message, which can make
216+
// `SHOW BACKENDS` return ERROR. We check errMsg here to avoid.
217+
if (errMsg != null) {
218+
heartbeatErrMsg = errMsg;
219+
}
216220
}
217221

218222
public void setBackendState(BackendState state) {

0 commit comments

Comments
 (0)