CRZbulabula commented on code in PR #12183: URL: https://github.com/apache/iotdb/pull/12183#discussion_r1544494293
########## iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/PartitionInfo.java: ########## @@ -785,6 +802,25 @@ public int getRegionGroupCount(String database, TConsensusGroupType type) return databasePartitionTables.get(database).getRegionGroupCount(type); } + /** + * Only leader use this interface. + * + * <p>Get the all RegionGroups currently in the cluster + * + * @param type SchemaRegion or DataRegion + * @return Map<Database, List<RegionGroupIds>> + */ + public Map<String, List<TConsensusGroupId>> getAllRegionGroupIdMap(TConsensusGroupType type) { + Map<String, List<TConsensusGroupId>> result = new TreeMap<>(); + databasePartitionTables.forEach( + (database, databasePartitionTable) -> { + if (databasePartitionTable.isNotPreDeleted()) { Review Comment: Sure, would cause concurrent bug otherwise >_< I noticed that cluster it included deleting databases couldn't pass without this pre-check. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@iotdb.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org