This is an automated email from the ASF dual-hosted git repository.
justinchen pushed a commit to branch DL
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/DL by this push:
new 22a4eb5b6ea DL
22a4eb5b6ea is described below
commit 22a4eb5b6ea9c8e846c36fc8f23375ded78f7262
Author: Caideyipi <[email protected]>
AuthorDate: Mon Dec 15 15:14:07 2025 +0800
DL
---
.../planner/distribute/TableDistributedPlanGenerator.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java
index 069d1df7469..e13d09de4a5 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java
@@ -23,6 +23,7 @@ import org.apache.iotdb.common.rpc.thrift.TDataNodeLocation;
import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet;
import org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot;
import org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot;
+import org.apache.iotdb.commons.exception.IoTDBRuntimeException;
import org.apache.iotdb.commons.partition.DataPartition;
import org.apache.iotdb.commons.partition.SchemaPartition;
import org.apache.iotdb.commons.schema.table.TsTable;
@@ -100,6 +101,7 @@ import
org.apache.iotdb.db.queryengine.plan.relational.sql.ast.SymbolReference;
import org.apache.iotdb.db.queryengine.plan.statement.component.Ordering;
import org.apache.iotdb.db.schemaengine.table.DataNodeTableCache;
import org.apache.iotdb.db.schemaengine.table.DataNodeTreeViewSchemaUtils;
+import org.apache.iotdb.rpc.TSStatusCode;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableListMultimap;
@@ -1004,7 +1006,11 @@ public class TableDistributedPlanGenerator
List<TDataNodeLocation> dataNodeLocations =
dataNodeLocationSupplier.getDataNodeLocations(
node.getQualifiedObjectName().getObjectName());
- checkArgument(!dataNodeLocations.isEmpty(), "DataNodeLocations shouldn't
be empty");
+ if (dataNodeLocations.isEmpty()) {
+ throw new IoTDBRuntimeException(
+ "No available dataNodes, may be the cluster is closing",
+ TSStatusCode.NO_AVAILABLE_REPLICA.getStatusCode());
+ }
List<PlanNode> resultTableScanNodeList = new ArrayList<>();
dataNodeLocations.forEach(