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 2021/11/25 09:17:30 UTC
[iotdb] branch rel/0.12 updated: [To rel/0.12] [IOTDB-2058] Query is blocked without sub-query-threads exist (#4463)
This is an automated email from the ASF dual-hosted git repository.
xiangweiwei pushed a commit to branch rel/0.12
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/0.12 by this push:
new 63a776a [To rel/0.12] [IOTDB-2058] Query is blocked without sub-query-threads exist (#4463)
63a776a is described below
commit 63a776adc4b480ef44b24d776e79e6ba1a2250ad
Author: Xiangwei Wei <34...@users.noreply.github.com>
AuthorDate: Thu Nov 25 17:15:40 2021 +0800
[To rel/0.12] [IOTDB-2058] Query is blocked without sub-query-threads exist (#4463)
---
.../query/dataset/RawQueryDataSetWithoutValueFilter.java | 14 +++++++-------
.../iotdb/tsfile/read/common/ExceptionBatchData.java | 10 +++++-----
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithoutValueFilter.java b/server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithoutValueFilter.java
index d135519..7640b08 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithoutValueFilter.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithoutValueFilter.java
@@ -110,12 +110,12 @@ public class RawQueryDataSetWithoutValueFilter extends QueryDataSet
e,
String.format(
"Something gets wrong while reading from the series reader %s: ", pathName));
- } catch (Exception e) {
+ } catch (Throwable e) {
putExceptionBatchData(e, "Something gets wrong: ");
}
}
- private void putExceptionBatchData(Exception e, String logMessage) {
+ private void putExceptionBatchData(Throwable e, String logMessage) {
try {
LOGGER.error(logMessage, e);
reader.setHasRemaining(false);
@@ -421,11 +421,11 @@ public class RawQueryDataSetWithoutValueFilter extends QueryDataSet
} else if (batchData instanceof ExceptionBatchData) {
// exception happened in producer thread
ExceptionBatchData exceptionBatchData = (ExceptionBatchData) batchData;
- LOGGER.error("exception happened in producer thread", exceptionBatchData.getException());
- if (exceptionBatchData.getException() instanceof IOException) {
- throw (IOException) exceptionBatchData.getException();
- } else if (exceptionBatchData.getException() instanceof RuntimeException) {
- throw (RuntimeException) exceptionBatchData.getException();
+ LOGGER.error("exception happened in producer thread", exceptionBatchData.getThrowable());
+ if (exceptionBatchData.getThrowable() instanceof IOException) {
+ throw (IOException) exceptionBatchData.getThrowable();
+ } else if (exceptionBatchData.getThrowable() instanceof RuntimeException) {
+ throw (RuntimeException) exceptionBatchData.getThrowable();
}
} else { // there are more batch data in this time series queue
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/ExceptionBatchData.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/ExceptionBatchData.java
index d71d39b..b26284b 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/ExceptionBatchData.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/ExceptionBatchData.java
@@ -20,10 +20,10 @@ package org.apache.iotdb.tsfile.read.common;
public class ExceptionBatchData extends BatchData {
- private Exception exception;
+ private Throwable throwable;
- public ExceptionBatchData(Exception exception) {
- this.exception = exception;
+ public ExceptionBatchData(Throwable throwable) {
+ this.throwable = throwable;
}
@Override
@@ -31,7 +31,7 @@ public class ExceptionBatchData extends BatchData {
throw new UnsupportedOperationException("hasCurrent is not supported for ExceptionBatchData");
}
- public Exception getException() {
- return exception;
+ public Throwable getThrowable() {
+ return throwable;
}
}