@Override
  public TSStatus setDatabase(final TDatabaseSchema databaseSchema) {
    final TSStatus setDefaultStatus =
        ClusterSchemaManager.enrichDatabaseSchemaWithDefaultProperties(databaseSchema);
    if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != setDefaultStatus.getCode()) {
      return setDefaultStatus;
    }

    final DatabaseSchemaPlan setPlan =
        new DatabaseSchemaPlan(ConfigPhysicalPlanType.CreateDatabase, databaseSchema);
    final TSStatus resp = configManager.setDatabase(setPlan);

    // Print log to record the ConfigNode that performs the set SetDatabaseRequest
    LOGGER.info("Execute SetDatabase: {} with result: {}", databaseSchema, resp);

    return resp;
  }
ConfigNodeRPCServer exposes the interface that interacts with the DataNode
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCServiceProcessor.java