This is an automated email from the ASF dual-hosted git repository.
yongzao 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 72a11f37168 Log corresponding database when the RegionGroups are not
available (#16244)
72a11f37168 is described below
commit 72a11f37168d0f931c822f23cf96fa3019f0334b
Author: Yongzao <[email protected]>
AuthorDate: Sun Aug 24 10:10:57 2025 +0800
Log corresponding database when the RegionGroups are not available (#16244)
---
.../exception/NoAvailableRegionGroupException.java | 14 +++++++++-----
.../confignode/manager/partition/PartitionManager.java | 2 +-
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableRegionGroupException.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableRegionGroupException.java
index 589cd481ded..9f66f78c44f 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableRegionGroupException.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableRegionGroupException.java
@@ -21,18 +21,22 @@ package org.apache.iotdb.confignode.exception;
import org.apache.iotdb.common.rpc.thrift.TConsensusGroupType;
+import java.util.List;
+
public class NoAvailableRegionGroupException extends ConfigNodeException {
- private static final String SCHEMA_REGION_GROUP = "SchemaRegionGroup";
- private static final String DATA_REGION_GROUP = "DataRegionGroup";
+ private static final String SCHEMA_REGION_GROUP = "SchemaRegionGroups";
+ private static final String DATA_REGION_GROUP = "DataRegionGroups";
- public NoAvailableRegionGroupException(final TConsensusGroupType
regionGroupType) {
+ public NoAvailableRegionGroupException(
+ final TConsensusGroupType regionGroupType, final List<String> databases)
{
super(
String.format(
- "There are no available %s RegionGroups currently, "
+ "There are no available %s for databases: %s currently, "
+ "please use \"show cluster\" or \"show regions\" to check
the cluster status",
TConsensusGroupType.SchemaRegion.equals(regionGroupType)
? SCHEMA_REGION_GROUP
- : DATA_REGION_GROUP));
+ : DATA_REGION_GROUP,
+ databases));
}
}
diff --git
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java
index fbbcb3cfa68..9488b3a8b47 100644
---
a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java
+++
b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java
@@ -961,7 +961,7 @@ public class PartitionManager {
}
if (result.isEmpty()) {
- throw new NoAvailableRegionGroupException(type);
+ throw new NoAvailableRegionGroupException(type,
Collections.singletonList(database));
}
final Map<TConsensusGroupId, RegionGroupStatus> regionGroupStatusMap =