You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xi...@apache.org on 2022/07/06 03:56:18 UTC
[iotdb] branch master updated: fix potential NPE (#6595)
This is an automated email from the ASF dual-hosted git repository.
xingtanzjr 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 b65b96340a fix potential NPE (#6595)
b65b96340a is described below
commit b65b96340a985d7a53fdff965bad06d97c09253b
Author: Marcos_Zyk <38...@users.noreply.github.com>
AuthorDate: Wed Jul 6 11:56:12 2022 +0800
fix potential NPE (#6595)
---
.../apache/iotdb/db/mpp/plan/analyze/ClusterPartitionFetcher.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ClusterPartitionFetcher.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ClusterPartitionFetcher.java
index 3aaddaa818..1e1e5c00f0 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ClusterPartitionFetcher.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ClusterPartitionFetcher.java
@@ -230,12 +230,15 @@ public class ClusterPartitionFetcher implements IPartitionFetcher {
client.getOrCreateDataPartition(constructDataPartitionReq(sgNameToQueryParamsMap));
if (dataPartitionResp.getStatus().getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
return parseDataPartitionResp(dataPartitionResp);
+ } else {
+ throw new StatementAnalyzeException(
+ "An error occurred when executing getOrCreateDataPartition():"
+ + dataPartitionResp.getStatus().getMessage());
}
} catch (TException | IOException e) {
throw new StatementAnalyzeException(
"An error occurred when executing getOrCreateDataPartition():" + e.getMessage());
}
- return null;
}
@Override