@Override
  public TSStatus createModel(TCreateModelReq req) {
    TSStatus status = confirmLeader();
    if (nodeManager.getRegisteredAINodes().isEmpty()) {
      return new TSStatus(TSStatusCode.NO_REGISTERED_AI_NODE_ERROR.getStatusCode())
          .setMessage("There is no available AINode! Try to start one.");
    }
    return status.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()
        ? modelManager.createModel(req)
        : status;
  }
Get all related dataRegion which may contains the data of specific timeseries matched by given
patternTree
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java