Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GOBBLIN-2119] ignore adding deadline dag actions if they are already present #4008

Merged
merged 4 commits into from
Jul 23, 2024

Conversation

arjun4084346
Copy link
Contributor

@arjun4084346 arjun4084346 commented Jul 23, 2024

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

Description

  • Here are some details about my PR, including screenshots (if applicable):
    If the service restarts before we call conclude on the lease, the deadline dag actions may get entered into the dag action store. The launch dag task (that creates deadline dag actions) will be retried on service start. It is not ideal to launch a job twice. When the job is launched again, it tries to store the deadline dag actions again and fails due to Primary Key constraint. We should ignore this exception otherwise the job submission will keep on being retried.

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:
    trivial changes

Commits

  • 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":
    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"

dagManagementStateStore.addDagAction(dagAction);
} catch (IOException e) {
if (e.getCause() != null && e.getCause() instanceof SQLIntegrityConstraintViolationException) {
dagManagementStateStore.deleteDagAction(dagAction);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why delete then re-add? is this to trigger CDC again?

Copy link
Contributor Author

@arjun4084346 arjun4084346 Jul 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intention is to have a deadline dag proc with the new deadline time.

Copy link
Contributor

@umustafi umustafi Jul 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see so we try launching same job but want to ensure the deadline is updated to reflect newer launch or at least that there's a deadline in memory for it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the metrics on startup it will show up as several deletions and additions but I think this is ok. no negative values

@arjun4084346 arjun4084346 changed the title ignore adding deadline dag actions if they are already present [GOBBLIN-2119] ignore adding deadline dag actions if they are already present Jul 23, 2024
@arjun4084346 arjun4084346 merged commit 2ea9622 into apache:master Jul 23, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants