public List<TRegionReplicaSet> getAllReplicaSets() {
    return databasePartitionTables.values().stream()
        .flatMap(DatabasePartitionTable::getAllReplicaSets)
        .collect(Collectors.toList());
  }
Only leader use this interface.

@return Deep copy of all Regions' RegionReplicaSet
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/PartitionInfo.java