private Callable<ISchemaRegion> recoverSchemaRegionTask(
      final String storageGroup, final SchemaRegionId schemaRegionId) {
    // this method is called for concurrent recovery of schema regions
    return () -> {
      long timeRecord = System.currentTimeMillis();
      try {
        // TODO: handle duplicated regionId across different database
        ISchemaRegion schemaRegion =
            createSchemaRegionWithoutExistenceCheck(storageGroup, schemaRegionId);
        timeRecord = System.currentTimeMillis() - timeRecord;
        logger.info(
            "Recover [{}] spend: {} ms",
            storageGroup + TsFileConstant.PATH_SEPARATOR + schemaRegionId.toString(),
            timeRecord);
        return schemaRegion;
      } catch (final MetadataException e) {
        logger.error(
            String.format(
                "SchemaRegion [%d] in StorageGroup [%s] failed to recover.",
                schemaRegionId.getId(), storageGroup));
        throw new RuntimeException(e);
      }
    };
  }
Scan the database and schema region directories to recover schema regions and return the
collected local schema partition info for localSchemaPartitionTable recovery.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/SchemaEngine.java