You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ta...@apache.org on 2021/09/22 07:35:15 UTC
[iotdb] 01/01: add createMultiTimeSeries execution log
This is an automated email from the ASF dual-hosted git repository.
tanxinyu pushed a commit to branch datang_test
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit a16e119526d80244dcc41b555a8e5bf639192927
Author: LebronAl <TX...@gmail.com>
AuthorDate: Wed Sep 22 15:19:50 2021 +0800
add createMultiTimeSeries execution log
---
.../java/org/apache/iotdb/cluster/log/applier/BaseApplier.java | 6 ++++++
.../main/java/org/apache/iotdb/cluster/server/monitor/Timer.java | 2 +-
.../main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java | 7 +++++++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/log/applier/BaseApplier.java b/cluster/src/main/java/org/apache/iotdb/cluster/log/applier/BaseApplier.java
index d1e6d6a..b748208 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/log/applier/BaseApplier.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/log/applier/BaseApplier.java
@@ -74,6 +74,8 @@ abstract class BaseApplier implements LogApplier {
if (plan instanceof InsertPlan) {
processPlanWithTolerance((InsertPlan) plan, dataGroupMember);
} else if (plan != null && !plan.isQuery()) {
+ long start = System.currentTimeMillis();
+ logger.error("start apply log {} in PlanExecutor", plan);
try {
getQueryExecutor().processNonQuery(plan);
} catch (BatchProcessException e) {
@@ -88,6 +90,10 @@ abstract class BaseApplier implements LogApplier {
} catch (StorageGroupNotSetException e) {
executeAfterSync(plan);
}
+ logger.error(
+ "apply log {} successfully in PlanExecutor: cost {}ms",
+ plan,
+ System.currentTimeMillis() - start);
} else if (plan != null) {
logger.error("Unsupported physical plan: {}", plan);
}
diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/server/monitor/Timer.java b/cluster/src/main/java/org/apache/iotdb/cluster/server/monitor/Timer.java
index f4ac980..8020baa 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/server/monitor/Timer.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/server/monitor/Timer.java
@@ -199,7 +199,7 @@ public class Timer {
RAFT_MEMBER_SENDER,
"apply logs that cannot run in parallel",
TIME_SCALE,
- RaftMember.USE_LOG_DISPATCHER,
+ true,
RAFT_SENDER_COMMIT_APPLY_LOGS),
RAFT_SENDER_COMMIT_WAIT_LOG_APPLY(
RAFT_MEMBER_SENDER, "wait until log is applied", TIME_SCALE, true, RAFT_SENDER_COMMIT_LOG),
diff --git a/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java b/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
index d4363ad..ee3f072 100644
--- a/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
+++ b/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
@@ -1522,10 +1522,12 @@ public class PlanExecutor implements IPlanExecutor {
private boolean createMultiTimeSeries(CreateMultiTimeSeriesPlan multiPlan)
throws BatchProcessException {
+ logger.error("createMultiTimeSeriesPlan size: {}", multiPlan.getPaths().size());
for (int i = 0; i < multiPlan.getPaths().size(); i++) {
if (multiPlan.getResults().containsKey(i) || multiPlan.isExecuted(i)) {
continue;
}
+ logger.error("try to create TimeSeries for {}", multiPlan.getPaths().get(i));
CreateTimeSeriesPlan plan =
new CreateTimeSeriesPlan(
multiPlan.getPaths().get(i),
@@ -1538,8 +1540,13 @@ public class PlanExecutor implements IPlanExecutor {
multiPlan.getAlias() == null ? null : multiPlan.getAlias().get(i));
try {
createTimeSeries(plan);
+ logger.error("create TimeSeries successfully for {}", multiPlan.getPaths().get(i));
} catch (QueryProcessException e) {
multiPlan.getResults().put(i, RpcUtils.getStatus(e.getErrorCode(), e.getMessage()));
+ logger.error(
+ "create TimeSeries failed for {} because {}",
+ multiPlan.getPaths().get(i),
+ e.toString());
}
}
if (!multiPlan.getResults().isEmpty()) {