[GOBBLIN-2086] Allow multiple reminders for the same dagAction in DagActionReminderS…
…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 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":
- Subject is separated from body by a blank line
- Subject is limited to 50 characters
- Subject does not end with a period
- Subject uses the imperative mood ("add", not "adding")
- Body wraps at 72 characters
- Body explains "what" and "why", not "how"
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.
checks on my fork https://github.com/umustafi/gobblin/pull/28
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.