public List<Pair<Long, TConsensusGroupId>> getRegionGroupSlotsCounter(
      String database, TConsensusGroupType type) {
    return databasePartitionTables.get(database).getRegionGroupSlotsCounter(type);
  }
Only leader use this interface.

@param database DatabaseName
@param type SchemaRegion or DataRegion
@return The database's Running or Available Regions that sorted by the number of allocated
    slots
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/PartitionInfo.java