You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ca...@apache.org on 2022/11/10 00:49:47 UTC
[iotdb] branch master updated: [IOTDB-4726]show cluster return with msg: 500 null (#7952)
This is an automated email from the ASF dual-hosted git repository.
caogaofei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new a5d6e97259 [IOTDB-4726]show cluster return with msg: 500 null (#7952)
a5d6e97259 is described below
commit a5d6e972592e462e5921a3ec749a78a43cd0f6ea
Author: ljn55966005 <32...@users.noreply.github.com>
AuthorDate: Thu Nov 10 08:49:40 2022 +0800
[IOTDB-4726]show cluster return with msg: 500 null (#7952)
---
.../execution/config/executor/ClusterConfigTaskExecutor.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java
index 406202398c..d909f82a1b 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java
@@ -165,6 +165,8 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
+import static org.apache.iotdb.db.client.ConfigNodeClient.MSG_RECONNECTION_FAIL;
+
public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
private static final Logger LOGGER = LoggerFactory.getLogger(ClusterConfigTaskExecutor.class);
@@ -731,7 +733,12 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
CONFIG_NODE_CLIENT_MANAGER.borrowClient(ConfigNodeInfo.partitionRegionId)) {
showClusterResp = client.showCluster();
} catch (TException | IOException e) {
- future.setException(e);
+ if (showClusterResp.getConfigNodeList() == null) {
+ future.setException(new TException(MSG_RECONNECTION_FAIL));
+ } else {
+ future.setException(e);
+ }
+ return future;
}
// build TSBlock
if (showClusterStatement.isDetails()) {
@@ -739,6 +746,7 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
} else {
ShowClusterTask.buildTSBlock(showClusterResp, future);
}
+
return future;
}