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/07/07 05:43:00 UTC
[iotdb] branch multileader_restart_test updated: fix the issues and add step tracker
This is an automated email from the ASF dual-hosted git repository.
xingtanzjr pushed a commit to branch multileader_restart_test
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/multileader_restart_test by this push:
new 62cdf9adb7 fix the issues and add step tracker
62cdf9adb7 is described below
commit 62cdf9adb71f01c55949e458a3a142f0f951765d
Author: Jinrui.Zhang <xi...@gmail.com>
AuthorDate: Thu Jul 7 13:42:49 2022 +0800
fix the issues and add step tracker
---
node-commons/src/main/java/org/apache/iotdb/commons/StepTracker.java | 5 ++++-
server/src/main/java/org/apache/iotdb/db/service/DataNode.java | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/node-commons/src/main/java/org/apache/iotdb/commons/StepTracker.java b/node-commons/src/main/java/org/apache/iotdb/commons/StepTracker.java
index f11c2a122f..1aef5cf11a 100644
--- a/node-commons/src/main/java/org/apache/iotdb/commons/StepTracker.java
+++ b/node-commons/src/main/java/org/apache/iotdb/commons/StepTracker.java
@@ -84,7 +84,10 @@ public class StepTracker {
if (metrics.get() == null) {
metrics.set(new HashMap<>());
}
- metrics.get().computeIfAbsent(stepName, key -> new Metric(stepName, printRate)).trace(startTime, endTime);
+ metrics
+ .get()
+ .computeIfAbsent(stepName, key -> new Metric(stepName, printRate))
+ .trace(startTime, endTime);
metrics.get().get(stepName).tryPrint();
}
diff --git a/server/src/main/java/org/apache/iotdb/db/service/DataNode.java b/server/src/main/java/org/apache/iotdb/db/service/DataNode.java
index 5b2f704f8b..eb9fe6dbbd 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/DataNode.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/DataNode.java
@@ -334,7 +334,7 @@ public class DataNode implements DataNodeMBean {
req.setDataNodeInfo(generateDataNodeInfo());
TSStatus status = configNodeClient.activeDataNode(req);
if (status.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()
- || status.getCode() == TSStatusCode.DATANODE_ALREADY_ACTIVATED.getStatusCode()) {
+ || status.getCode() == TSStatusCode.DATANODE_ALREADY_REGISTERED.getStatusCode()) {
logger.info("Joined the cluster successfully");
return;
}