private void prepareToResetDataRegionPeerList(List<TRegionReplicaSet> correctedRegions) {
    Map<ConsensusGroupId, List<Peer>> correctPeerListForDataRegion = new HashMap<>();
    Map<ConsensusGroupId, List<Peer>> correctPeerListForSchemaRegion = new HashMap<>();
    for (TRegionReplicaSet regionReplicaSet : correctedRegions) {
      ConsensusGroupId consensusGroupId =
          ConsensusGroupId.Factory.createFromTConsensusGroupId(regionReplicaSet.regionId);
      List<Peer> peerList = new ArrayList<>();
      if (consensusGroupId.getType() == TConsensusGroupType.DataRegion) {
        for (TDataNodeLocation dataNodeLocation : regionReplicaSet.getDataNodeLocations()) {
          peerList.add(
              new Peer(
                  consensusGroupId,
                  dataNodeLocation.getDataNodeId(),
                  dataNodeLocation.getDataRegionConsensusEndPoint()));
        }
        correctPeerListForDataRegion.put(consensusGroupId, peerList);
      } else if (consensusGroupId.getType() == TConsensusGroupType.SchemaRegion) {
        for (TDataNodeLocation dataNodeLocation : regionReplicaSet.getDataNodeLocations()) {
          peerList.add(
              new Peer(
                  consensusGroupId,
                  dataNodeLocation.getDataNodeId(),
                  dataNodeLocation.getSchemaRegionConsensusEndPoint()));
        }
        correctPeerListForSchemaRegion.put(consensusGroupId, peerList);
      }
    }
    DataRegionConsensusImpl.getInstance()
        .recordCorrectPeerListBeforeStarting(correctPeerListForDataRegion);
    SchemaRegionConsensusImpl.getInstance()
        .recordCorrectPeerListBeforeStarting(correctPeerListForSchemaRegion);
  }
Register this DataNode into cluster.

@param isPreCheck do pre-check before formal registration
@throws StartupException if register failed.
@throws IOException if serialize cluster name and datanode id failed.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java