public List<TConsensusGroupId> getRegionId(
      TConsensusGroupType type,
      TSeriesPartitionSlot seriesSlotId,
      TTimePartitionSlot startTimeSlotId,
      TTimePartitionSlot endTimeSlotId) {
    if (type == TConsensusGroupType.DataRegion) {
      return dataPartitionTable.getRegionId(seriesSlotId, startTimeSlotId, endTimeSlotId);
    } else if (type == TConsensusGroupType.SchemaRegion) {
      return schemaPartitionTable.getRegionId(seriesSlotId);
    } else {
      return new ArrayList<>();
    }
  }
Only leader use this interface.

@param type SchemaRegion or DataRegion
@return RegionGroups' slot count and index
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/DatabasePartitionTable.java