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/02/16 10:04:10 UTC
[iotdb] branch 0.12errorlog created (now f65b953)
This is an automated email from the ASF dual-hosted git repository.
xiangweiwei pushed a change to branch 0.12errorlog
in repository https://gitbox.apache.org/repos/asf/iotdb.git.
at f65b953 add status
This branch includes the following new commits:
new f65b953 add status
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[iotdb] 01/01: add status
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiangweiwei pushed a commit to branch 0.12errorlog
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit f65b953b2c59804e63856747f9e9167c9787e713
Author: Alima777 <wx...@gmail.com>
AuthorDate: Wed Feb 16 18:03:15 2022 +0800
add status
---
.../java/org/apache/iotdb/db/service/TSServiceImpl.java | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
index 449e75c..431e687 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
@@ -722,15 +722,11 @@ public class TSServiceImpl implements TSIService.Iface {
}
} catch (Exception e) {
LOGGER.error("Error occurred when executing executeBatchStatement: ", e);
- TSStatus status = tryCatchQueryException(e);
- if (status != null) {
- result.add(status);
+ TSStatus status = onQueryException(e, "executing " + statement);
+ if (status.getCode() != TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()) {
isAllSuccessful = false;
- } else {
- result.add(
- onNPEOrUnexpectedException(
- e, "executing " + statement, TSStatusCode.INTERNAL_SERVER_ERROR));
}
+ result.add(status);
}
}
Measurement.INSTANCE.addOperationLatency(Operation.EXECUTE_JDBC_BATCH, t1);
@@ -1972,26 +1968,20 @@ public class TSServiceImpl implements TSIService.Iface {
}
if (e instanceof QueryTimeoutRuntimeException) {
- DETAILED_FAILURE_QUERY_TRACE_LOGGER.warn(e.getMessage(), e);
return RpcUtils.getStatus(TSStatusCode.TIME_OUT, rootCause.getMessage());
} else if (e instanceof ParseCancellationException) {
- DETAILED_FAILURE_QUERY_TRACE_LOGGER.warn(INFO_PARSING_SQL_ERROR, e);
return RpcUtils.getStatus(
TSStatusCode.SQL_PARSE_ERROR, INFO_PARSING_SQL_ERROR + rootCause.getMessage());
} else if (e instanceof SQLParserException) {
- DETAILED_FAILURE_QUERY_TRACE_LOGGER.warn(INFO_CHECK_METADATA_ERROR, e);
return RpcUtils.getStatus(
TSStatusCode.METADATA_ERROR, INFO_CHECK_METADATA_ERROR + rootCause.getMessage());
} else if (e instanceof QueryProcessException) {
- DETAILED_FAILURE_QUERY_TRACE_LOGGER.warn(INFO_QUERY_PROCESS_ERROR, e);
return RpcUtils.getStatus(
TSStatusCode.QUERY_PROCESS_ERROR, INFO_QUERY_PROCESS_ERROR + rootCause.getMessage());
} else if (e instanceof QueryInBatchStatementException) {
- DETAILED_FAILURE_QUERY_TRACE_LOGGER.warn(INFO_NOT_ALLOWED_IN_BATCH_ERROR, e);
return RpcUtils.getStatus(
TSStatusCode.QUERY_NOT_ALLOWED, INFO_NOT_ALLOWED_IN_BATCH_ERROR + rootCause.getMessage());
} else if (e instanceof IoTDBException) {
- DETAILED_FAILURE_QUERY_TRACE_LOGGER.warn(INFO_QUERY_PROCESS_ERROR, e);
return RpcUtils.getStatus(((IoTDBException) e).getErrorCode(), rootCause.getMessage());
}
return null;