aga9900 commented on code in PR #4136:
URL: https://github.com/apache/gobblin/pull/4136#discussion_r2300209854


##########
gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/org/apache/gobblin/service/modules/restli/FlowConfigsV2ResourceHandler.java:
##########
@@ -248,8 +251,22 @@ public CreateKVResponse<ComplexResourceKey<FlowId, 
FlowStatusId>, FlowConfig> cr
     // Return conflict and take no action if flowSpec has already been created
     if (this.flowCatalog.exists(flowSpec.getUri())) {
       log.warn("FlowSpec with URI {} already exists, no action will be taken", 
flowSpec.getUri());
-      return new CreateKVResponse<>(new 
RestLiServiceException(HttpStatus.S_409_CONFLICT,
-          "FlowSpec with URI " + flowSpec.getUri() + " already exists, no 
action will be taken"));
+      try {
+        FlowSpec storedFlowSpec = this.flowCatalog.getSpecs(flowSpec.getUri());
+        if (!storedFlowSpec.isScheduled()) {
+          log.error("FlowSpec Already Exists As Adhoc Flow  with URI: " + 
flowSpec.getUri());

Review Comment:
   Corrected.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to