Skip to content

Commit 5e7a8c7

Browse files
authored
Avoid NPE for show variables task (apache#16444)
1 parent 9cbb773 commit 5e7a8c7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,13 @@ public SettableFuture<ConfigTaskResult> showClusterParameters() {
15271527
CONFIG_NODE_CLIENT_MANAGER.borrowClient(ConfigNodeInfo.CONFIG_REGION_ID)) {
15281528
showVariablesResp = client.showVariables();
15291529
} catch (ClientManagerException | TException e) {
1530-
future.setException(e);
1530+
if (showVariablesResp.getStatus().getCode()
1531+
== TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
1532+
future.setException(new TException(MSG_RECONNECTION_FAIL));
1533+
} else {
1534+
future.setException(e);
1535+
}
1536+
return future;
15311537
}
15321538

15331539
// build TSBlock

0 commit comments

Comments
 (0)