[ 
https://issues.apache.org/jira/browse/GOBBLIN-2086?focusedWorklogId=923179&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-923179
 ]

ASF GitHub Bot logged work on GOBBLIN-2086:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Jun/24 20:41
            Start Date: 12/Jun/24 20:41
    Worklog Time Spent: 10m 
      Work Description: arjun4084346 commented on code in PR #3971:
URL: https://github.com/apache/gobblin/pull/3971#discussion_r1637059266


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagActionReminderScheduler.java:
##########
@@ -68,7 +68,12 @@ public void scheduleReminder(DagActionStore.DagAction 
dagAction, long reminderDu
       throws SchedulerException {
     JobDetail jobDetail = createReminderJobDetail(dagAction);
     Trigger trigger = createReminderJobTrigger(dagAction, 
reminderDurationMillis, System::currentTimeMillis);
-    quartzScheduler.scheduleJob(jobDetail, trigger);
+    /* Add the job to the scheduler if it doesn't already exist. Note the job 
already exists for the true reminders of
+    dag actions of type ENFORCE_JOB_START_DEADLINE and 
ENFORCE_FLOW_FINISH_DEADLINE because the original (non-reminder)
+    actions are added to the scheduler to notify the hosts when the deadlines 
have passed.
+    */
+    quartzScheduler.addJob(jobDetail, true);
+    quartzScheduler.scheduleJob(trigger);

Review Comment:
   shouldn't we catch the exception and if it is because the job/schedule is 
already present, ignore it?





Issue Time Tracking
-------------------

    Worklog Id:     (was: 923179)
    Time Spent: 50m  (was: 40m)

> Allow multiple reminders for the same dagAction in DagActionReminderScheduler
> -----------------------------------------------------------------------------
>
>                 Key: GOBBLIN-2086
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2086
>             Project: Apache Gobblin
>          Issue Type: Bug
>          Components: gobblin-service
>            Reporter: Urmi Mustafi
>            Assignee: Abhishek Tiwari
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> An ObjectAlreadyExistsException is thrown by the QuartzScheduler for deadline 
> dagAction types when attempting to set a reminder on the lease of a deadline 
> dagAction type because the original (non-reminder) job may still exist in the 
> DagActionReminderScheduler. It's a non-fatal exception to have redundant 
> reminders on the same dagAction so the code change gracefully handles this 
> problem.
>  
> Exception: 
> Unable to store Job : 
> '[flowgroup].[flowname].[flowid].ENFORCE_JOB_START_DEADLINE', because one 
> already exists with this 
> identification.","stackTrace":[\{"index":0,"call":"storeJob","columnNumber":null,"fileName":"RAMJobStore.java","lineNumber":279,"nativeMethod":"0","source":"org.quartz.simpl.RAMJobStore"},{"index":1,"call":"storeJobAndTrigger",



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to