private void removeInvalidSchemaRegions(List<ConsensusGroupId> schemaConsensusGroupIds) {
    Map<String, List<SchemaRegionId>> localSchemaRegionInfo =
        SchemaEngine.getLocalSchemaRegionInfo();
    localSchemaRegionInfo.forEach(
        (database, schemaRegionIds) -> {
          for (SchemaRegionId schemaRegionId : schemaRegionIds) {
            if (!schemaConsensusGroupIds.contains(schemaRegionId)) {
              removeInvalidSchemaDir(database, schemaRegionId);
            }
          }
        });
  }
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