This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch ca_test
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/ca_test by this push:
new 2d953e88013 Update DataNodeHeartbeatCache.java
2d953e88013 is described below
commit 2d953e880138cfd8e18470cad0ebe324b3c57a3e
Author: YongzaoDan <[email protected]>
AuthorDate: Tue Aug 15 15:29:54 2023 +0800
Update DataNodeHeartbeatCache.java
---
.../confignode/manager/load/cache/node/DataNodeHeartbeatCache.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/cache/node/DataNodeHeartbeatCache.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/cache/node/DataNodeHeartbeatCache.java
index d3f3dc35c98..7e47edb4fd2 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/cache/node/DataNodeHeartbeatCache.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/cache/node/DataNodeHeartbeatCache.java
@@ -54,7 +54,9 @@ public class DataNodeHeartbeatCache extends BaseNodeCache {
NodeStatus status = null;
String statusReason = null;
// TODO: Optimize judge logic
- if (System.currentTimeMillis() - lastSendTime > HEARTBEAT_TIMEOUT_TIME) {
+ if (lastSample != null &&
NodeStatus.Removing.equals(lastSample.getStatus())) {
+ status = NodeStatus.Removing;
+ } else if (System.currentTimeMillis() - lastSendTime >
HEARTBEAT_TIMEOUT_TIME) {
status = NodeStatus.Unknown;
} else if (lastSample != null) {
status = lastSample.getStatus();