Skip to content

Commit

Permalink
Fix SHOW BACKENDS return ERROR (#320)
Browse files Browse the repository at this point in the history
In some case, errMsg in Backend maybe null. we change it when check it
nut null

Issue: #317
  • Loading branch information
imay authored Nov 15, 2018
1 parent f1b6735 commit 8ac9492
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fe/src/main/java/org/apache/doris/system/Backend.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@ public void setBad(EventBus eventBus, String errMsg) {
}

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

public void setBackendState(BackendState state) {
Expand Down

0 comments on commit 8ac9492

Please sign in to comment.