You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2024/01/09 10:06:42 UTC
(iotdb) branch ty/errorAccuracy created (now 14e22ee6ace)
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a change to branch ty/errorAccuracy
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at 14e22ee6ace Make timeout error msg
This branch includes the following new commits:
new 14e22ee6ace Make timeout error msg
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: Make timeout error msg
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch ty/errorAccuracy
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 14e22ee6aceddba86b63cfa8e50a4f28faabdb1c
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Tue Jan 9 18:06:31 2024 +0800
Make timeout error msg
---
.../iotdb/db/queryengine/execution/schedule/DriverScheduler.java | 7 ++++++-
.../queryengine/plan/scheduler/FixedRateFragInsStateTracker.java | 8 ++++++--
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverScheduler.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverScheduler.java
index 1ad010eead7..572aeeb9a78 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverScheduler.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/DriverScheduler.java
@@ -50,6 +50,7 @@ import org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.SettableFuture;
+import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -576,6 +577,7 @@ public class DriverScheduler implements IDriverScheduler, IService {
task.unlock();
}
clearDriverTask(task);
+ String abortCause = task.getAbortCause();
QueryId queryId = task.getDriverTaskId().getQueryId();
Map<FragmentInstanceId, Set<DriverTask>> queryRelatedTasks = queryMap.remove(queryId);
if (queryRelatedTasks != null) {
@@ -586,7 +588,10 @@ public class DriverScheduler implements IDriverScheduler, IService {
if (task.equals(otherTask)) {
continue;
}
- otherTask.setAbortCause(DriverTaskAbortedException.BY_QUERY_CASCADING_ABORTED);
+ otherTask.setAbortCause(
+ StringUtils.isEmpty(abortCause)
+ ? DriverTaskAbortedException.BY_QUERY_CASCADING_ABORTED
+ : abortCause);
clearDriverTask(otherTask);
}
}
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FixedRateFragInsStateTracker.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FixedRateFragInsStateTracker.java
index 65a22e7190a..36e4bdc99ac 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FixedRateFragInsStateTracker.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/FixedRateFragInsStateTracker.java
@@ -124,7 +124,9 @@ public class FixedRateFragInsStateTracker extends AbstractFragInsStateTracker {
instance.getId(), k -> new InstanceStateMetrics(instance.isRoot()));
if (needPrintState(
metrics.lastState, instanceInfo.getState(), metrics.durationToLastPrintInMS)) {
- logger.debug("[PrintFIState] state is {}", instanceInfo.getState());
+ if (logger.isDebugEnabled()) {
+ logger.debug("[PrintFIState] state is {}", instanceInfo.getState());
+ }
metrics.reset(instanceInfo.getState());
} else {
metrics.addDuration(STATE_FETCH_INTERVAL_IN_MS);
@@ -144,7 +146,9 @@ public class FixedRateFragInsStateTracker extends AbstractFragInsStateTracker {
if (instanceInfo.getFailureInfoList() == null
|| instanceInfo.getFailureInfoList().isEmpty()) {
stateMachine.transitionToFailed(
- new RuntimeException(String.format("FragmentInstance[%s] is failed.", instanceId)));
+ new RuntimeException(
+ String.format(
+ "FragmentInstance[%s] is failed. %s", instanceId, instanceInfo.getMessage())));
} else {
stateMachine.transitionToFailed(instanceInfo.getFailureInfoList().get(0).toException());
}