public List<TRegionReplicaSet> getAllReplicaSets(String database, TConsensusGroupType type) {
    return partitionInfo.getAllReplicaSets(database, type);
  }
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/manager/partition/PartitionManager.java