public List<TRegionReplicaSet> getAllReplicaSets(String database, TConsensusGroupType type) {
    if (databasePartitionTables.containsKey(database)) {
      return databasePartitionTables.get(database).getAllReplicaSets(type);
    } else {
      return Collections.emptyList();
    }
  }
Only leader use this interface.

@param database The specified Database
@param type SchemaRegion or DataRegion
@return Deep copy of all Regions' RegionReplicaSet with the specified Database and
    TConsensusGroupType
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/PartitionInfo.java