public List<TConsensusGroupId> getAllRegionGroupIds(String database, TConsensusGroupType type)
      throws DatabaseNotExistsException {
    return partitionInfo.getAllRegionGroupIds(database, type);
  }
Only leader use this interface.

<p>Get all the RegionGroups currently owned by the specified Database

@param database DatabaseName
@param type SchemaRegion or DataRegion
@return List of TConsensusGroupId
@throws DatabaseNotExistsException When the specified Database doesn't exist
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java