arjnklc commented on code in PR #10814:
URL: https://github.com/apache/gravitino/pull/10814#discussion_r3178062808


##########
core/src/main/java/org/apache/gravitino/job/JobManager.java:
##########
@@ -464,6 +464,31 @@ public JobEntity runJob(String metalake, String 
jobTemplateName, Map<String, Str
     try {
       entityStore.put(jobEntity, false /* overwrite */);
     } catch (IOException e) {
+      // Attempt to cancel the submitted job to avoid orphaned executions
+      try {
+        jobExecutor.cancelJob(jobExecutionId);

Review Comment:
   Thanks for the review,
   
   I thought using jobExecutor instead of jobManager here to cancel the job 
bypasses the entity store, since the executor tracks the job internally from 
the moment submitJob returns. Should I drop this cancellation and just keep the 
staging directory cleanup?



-- 
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