public List<TRegionReplicaSet> getAllReplicaSets(TConsensusGroupType type) {
    return partitionInfo.getAllReplicaSets(type);
  }
Only leader use this interface.

@param type The specified TConsensusGroupType
@return Deep copy of all Regions' RegionReplicaSet with the specified TConsensusGroupType
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java