private void makeRegionsCorrect(List<TRegionReplicaSet> correctRegions) {
    List<ConsensusGroupId> dataNodeConsensusGroupIds =
        correctRegions.stream()
            .map(TRegionReplicaSet::getRegionId)
            .map(ConsensusGroupId.Factory::createFromTConsensusGroupId)
            .collect(Collectors.toList());
    removeInvalidDataRegions(dataNodeConsensusGroupIds);
    removeInvalidSchemaRegions(dataNodeConsensusGroupIds);
    prepareToResetDataRegionPeerList(correctRegions);
  }
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