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 2357a5f50f1c8..571288349639c 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 @@ private List getReachableCandidates(List a 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> topologyMapCurrent = Collections.unmodifiableMap(this.topologyMap.get());