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

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

                Author: ASF GitHub Bot
            Created on: 23/Jun/24 19:53
            Start Date: 23/Jun/24 19:53
    Worklog Time Spent: 10m 
      Work Description: umustafi commented on code in PR #3984:
URL: https://github.com/apache/gobblin/pull/3984#discussion_r1650175142


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/FlowLaunchHandler.java:
##########
@@ -233,7 +234,7 @@ protected JobDetailImpl 
createJobDetailForReminderEvent(JobKey originalKey, JobK
       throws SchedulerException {
     JobDetailImpl jobDetail = (JobDetailImpl) 
this.schedulerService.getScheduler().getJobDetail(originalKey);
     jobDetail.setKey(reminderKey);
-    JobDataMap jobDataMap = jobDetail.getJobDataMap();
+    JobDataMap jobDataMap = deepCopyJobDataMap(jobDetail.getJobDataMap());
     jobDataMap = updatePropsInJobDataMap(jobDataMap, status, 
schedulerMaxBackoffMillis);

Review Comment:
   clone creates a shallow copy of the Properties object. It seems safer to 
provide a deep copy of the jobDataMap (and Properties obj) to be copied which 
can be modified in the update method





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

    Worklog Id:     (was: 924034)
    Time Spent: 20m  (was: 10m)

> Use unique JobDataMaps and Properties to use for reminder events
> ----------------------------------------------------------------
>
>                 Key: GOBBLIN-2097
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2097
>             Project: Apache Gobblin
>          Issue Type: Bug
>          Components: gobblin-service
>            Reporter: Urmi Mustafi
>            Assignee: Abhishek Tiwari
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> We notice that after deploying the service all subsequent scheduler triggers 
> after the very first one are incorrectly marked as reminders even when they 
> are for "original" events. This is a result of re-using the same JobDataMap 
> and Properties object between the original and reminder Jobs for the 
> Scheduler. The following changes create deep copies of both to use for the 
> reminders so adding a reminder flag in one will not affect the other. 



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

Reply via email to