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 09:11:42 UTC
[iotdb] branch errorLog created (now 07613ef)
This is an automated email from the ASF dual-hosted git repository.
xiangweiwei pushed a change to branch errorLog
in repository https://gitbox.apache.org/repos/asf/iotdb.git.
at 07613ef modify method invocation
This branch includes the following new commits:
new 5af9819 remove redundant log
new 07613ef modify method invocation
The 2 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] 02/02: modify method invocation
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiangweiwei pushed a commit to branch errorLog
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 07613efb5e37f610ccde29d51faa61b752b8d551
Author: Alima777 <wx...@gmail.com>
AuthorDate: Wed Feb 16 17:10:40 2022 +0800
modify method invocation
---
.../apache/iotdb/db/service/thrift/impl/TSServiceImpl.java | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java
index 884a136..f2142b6 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java
@@ -157,7 +157,6 @@ import static org.apache.iotdb.db.utils.ErrorHandlingUtils.onIoTDBException;
import static org.apache.iotdb.db.utils.ErrorHandlingUtils.onNPEOrUnexpectedException;
import static org.apache.iotdb.db.utils.ErrorHandlingUtils.onNonQueryException;
import static org.apache.iotdb.db.utils.ErrorHandlingUtils.onQueryException;
-import static org.apache.iotdb.db.utils.ErrorHandlingUtils.tryCatchQueryException;
/** Thrift RPC implementation at server side. */
public class TSServiceImpl implements TSIService.Iface {
@@ -584,16 +583,10 @@ 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, "\"" + statement + "\". " + OperationType.EXECUTE_BATCH_STATEMENT);
+ if (status.getCode() != TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()) {
isAllSuccessful = false;
- } else {
- result.add(
- onNPEOrUnexpectedException(
- e,
- "\"" + statement + "\". " + OperationType.EXECUTE_BATCH_STATEMENT,
- TSStatusCode.INTERNAL_SERVER_ERROR));
}
}
}
[iotdb] 01/02: remove redundant log
Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
xiangweiwei pushed a commit to branch errorLog
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 5af98199d18ffd2c0cca42fc07d6e1cd52781bcb
Author: Alima777 <wx...@gmail.com>
AuthorDate: Wed Feb 16 17:08:48 2022 +0800
remove redundant log
---
.../main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java | 7 -------
1 file changed, 7 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java b/server/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
index 5d6bd2c..edee748 100644
--- a/server/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
+++ b/server/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
@@ -101,29 +101,22 @@ public class ErrorHandlingUtils {
Throwable t = e instanceof ExecutionException ? e.getCause() : e;
if (t instanceof QueryTimeoutRuntimeException) {
- DETAILED_FAILURE_QUERY_TRACE_LOGGER.warn(t.getMessage(), t);
return RpcUtils.getStatus(TSStatusCode.TIME_OUT, rootCause.getMessage());
} else if (t instanceof ParseCancellationException) {
- DETAILED_FAILURE_QUERY_TRACE_LOGGER.warn(INFO_PARSING_SQL_ERROR, t);
return RpcUtils.getStatus(
TSStatusCode.SQL_PARSE_ERROR, INFO_PARSING_SQL_ERROR + rootCause.getMessage());
} else if (t instanceof SQLParserException) {
- DETAILED_FAILURE_QUERY_TRACE_LOGGER.warn(INFO_CHECK_METADATA_ERROR, t);
return RpcUtils.getStatus(
TSStatusCode.METADATA_ERROR, INFO_CHECK_METADATA_ERROR + rootCause.getMessage());
} else if (t instanceof QueryProcessException) {
- DETAILED_FAILURE_QUERY_TRACE_LOGGER.warn(INFO_QUERY_PROCESS_ERROR, t);
return RpcUtils.getStatus(
TSStatusCode.QUERY_PROCESS_ERROR, INFO_QUERY_PROCESS_ERROR + rootCause.getMessage());
} else if (t instanceof QueryInBatchStatementException) {
- DETAILED_FAILURE_QUERY_TRACE_LOGGER.warn(INFO_NOT_ALLOWED_IN_BATCH_ERROR, t);
return RpcUtils.getStatus(
TSStatusCode.QUERY_NOT_ALLOWED, INFO_NOT_ALLOWED_IN_BATCH_ERROR + rootCause.getMessage());
} else if (t instanceof IoTDBException) {
- DETAILED_FAILURE_QUERY_TRACE_LOGGER.warn(INFO_QUERY_PROCESS_ERROR, t);
return RpcUtils.getStatus(((IoTDBException) t).getErrorCode(), rootCause.getMessage());
} else if (t instanceof TsFileRuntimeException) {
- DETAILED_FAILURE_QUERY_TRACE_LOGGER.warn(INFO_QUERY_PROCESS_ERROR, t);
return RpcUtils.getStatus(TSStatusCode.TSFILE_PROCESSOR_ERROR, rootCause.getMessage());
}
return null;