You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "umustafi (via GitHub)" <gi...@apache.org> on 2024/06/12 19:37:41 UTC
[PR] [GOBBLIN-2086] Allow multiple reminders for the same dagAction in DagActionReminderS… [gobblin]
umustafi opened a new pull request, #3971:
URL: https://github.com/apache/gobblin/pull/3971
…cheduler
Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
### JIRA
- [ ] My PR addresses the following [Gobblin JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
- https://issues.apache.org/jira/browse/GOBBLIN-2086
### Description
- [X] Here are some details about my PR, including screenshots (if applicable):
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",
### Tests
- [X] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
- Updates test to verify jobs are not durably stored (orphaned jobs, or those without triggers, are deleted)
- Adds test to validate no error thrown for job with multiple reminders
### Commits
- [X] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
2. Subject is limited to 50 characters
3. Subject does not end with a period
4. Subject uses the imperative mood ("add", not "adding")
5. Body wraps at 72 characters
6. Body explains "what" and "why", not "how"
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GOBBLIN-2086] Allow multiple reminders for the same dagAction in DagActionReminderS… [gobblin]
Posted by "umustafi (via GitHub)" <gi...@apache.org>.
umustafi closed pull request #3971: [GOBBLIN-2086] Allow multiple reminders for the same dagAction in DagActionReminderS…
URL: https://github.com/apache/gobblin/pull/3971
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GOBBLIN-2086] Allow multiple reminders for the same dagAction in DagActionReminderS… [gobblin]
Posted by "arjun4084346 (via GitHub)" <gi...@apache.org>.
arjun4084346 commented on PR #3971:
URL: https://github.com/apache/gobblin/pull/3971#issuecomment-2163955807
because dagActionQueue is threadsafe, two threads should not pull out the same dag action and try to set reminder for it. it seems there is something more to this issue.
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GOBBLIN-2086] Allow multiple reminders for the same dagAction in DagActionReminderS… [gobblin]
Posted by "arjun4084346 (via GitHub)" <gi...@apache.org>.
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?
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GOBBLIN-2086] Allow multiple reminders for the same dagAction in DagActionReminderS… [gobblin]
Posted by "arjun4084346 (via GitHub)" <gi...@apache.org>.
arjun4084346 commented on code in PR #3971:
URL: https://github.com/apache/gobblin/pull/3971#discussion_r1637040873
##########
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);
Review Comment:
java doc says, "The Job must by definition be 'durable', if it is not, SchedulerException will be thrown."
the job is not durable. then why the unit test is not throwing exception?
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GOBBLIN-2086] Allow multiple reminders for the same dagAction in DagActionReminderS… [gobblin]
Posted by "umustafi (via GitHub)" <gi...@apache.org>.
umustafi commented on PR #3971:
URL: https://github.com/apache/gobblin/pull/3971#issuecomment-2163772346
Actually thinking over this a second time, I don't think the original (non-reminder) job will still exist in the scheduler bc it should have been deleted since it was an "orphan" after the deadline passed and the trigger fired. I'm trying to validate why we may end up with multiple reminders than for this type of event. Let me know if you have thoughts.
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [GOBBLIN-2086] Allow multiple reminders for the same dagAction in DagActionReminderS… [gobblin]
Posted by "umustafi (via GitHub)" <gi...@apache.org>.
umustafi commented on PR #3971:
URL: https://github.com/apache/gobblin/pull/3971#issuecomment-2163773221
checks on my fork https://github.com/umustafi/gobblin/pull/28
--
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: dev-unsubscribe@gobblin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org