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 2025/04/16 07:54:56 UTC
(iotdb) branch master updated: [RTO/RPO] Fix: NullPointer in ClusterTopology #15347
This is an automated email from the ASF dual-hosted git repository.
tanxinyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 88095bc2e52 [RTO/RPO] Fix: NullPointer in ClusterTopology #15347
88095bc2e52 is described below
commit 88095bc2e520a707a877eb96880a9e23786a249f
Author: William Song <48...@users.noreply.github.com>
AuthorDate: Wed Apr 16 15:54:51 2025 +0800
[RTO/RPO] Fix: NullPointer in ClusterTopology #15347
---
.../java/org/apache/iotdb/db/queryengine/plan/ClusterTopology.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/ClusterTopology.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/ClusterTopology.java
index 2357a5f50f1..57128834963 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/ClusterTopology.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/ClusterTopology.java
@@ -89,6 +89,10 @@ public class ClusterTopology {
if (!isPartitioned.get() || all == null || all.isEmpty()) {
return all;
}
+ if (all.stream().anyMatch(set -> set.getDataNodeLocationsSize() == 0)) {
+ // some TRegionReplicaSet is unreachable since all DataNodes are down
+ return Collections.emptyList();
+ }
final Map<Integer, Set<Integer>> topologyMapCurrent =
Collections.unmodifiableMap(this.topologyMap.get());