Skip to content

[GOBBLIN-2090] delete deadline triggers in all hosts#3973

Merged
arjun4084346 merged 6 commits into
apache:masterfrom
arjun4084346:fix
Jun 17, 2024
Merged

[GOBBLIN-2090] delete deadline triggers in all hosts#3973
arjun4084346 merged 6 commits into
apache:masterfrom
arjun4084346:fix

Conversation

@arjun4084346

@arjun4084346 arjun4084346 commented Jun 13, 2024

Copy link
Copy Markdown
Contributor

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):
    i) It changes DagManagementDagActionStoreChangeMonitor and delete triggers whenever deadline enforcement dag actions are deleted.
    ii) Removed EnforceJobStartDeadlineDagAction when a job/dag is cancelled, so that the job that never started (and hence able to clear EnforceJobStartDeadlineDagAction), can clean it now.
    iii) removed unused enums CANCEL and RETRY in DagActionStore
    iv) also fixes several unit tests and did refactoring
    v) fixed codestyle changes suggested by intelliJ whatever came across during the work

Tests

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

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"

@codecov-commenter

codecov-commenter commented Jun 13, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 47.19%. Comparing base (227f39b) to head (f984495).
Report is 3 commits behind head on master.

Files Patch % Lines
.../org/apache/gobblin/metastore/MysqlStateStore.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3973      +/-   ##
============================================
- Coverage     54.80%   47.19%   -7.61%     
- Complexity     1608     8103    +6495     
============================================
  Files           316     1553    +1237     
  Lines         11516    61489   +49973     
  Branches       1204     6969    +5765     
============================================
+ Hits           6311    29019   +22708     
- Misses         4629    29779   +25150     
- Partials        576     2691    +2115     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

public DagManagementDagActionStoreChangeMonitor(Config config, int numThreads,
FlowCatalog flowCatalog, Orchestrator orchestrator, DagManagementStateStore dagManagementStateStore,
boolean isMultiActiveSchedulerEnabled, DagManagement dagManagement) {
boolean isMultiActiveSchedulerEnabled, DagManagement dagManagement, DagActionReminderScheduler dagActionReminderScheduler) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do u need to make sure initialization order in guide works here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

DagActionReminderScheduler only needs StdSchedulerFactory, which does not need any other dependency for initialization, so there should not be any circular dependency.
If creation of DagActionReminderScheduler were indirectly dependent on DagManagementDagActionStoreChangeMonitorFactory, that would have been a problem.

Comment on lines +179 to +186
public static void mockDMSSCommonBehavior(DagManagementStateStore dagManagementStateStore) throws IOException, SpecNotFoundException {
doReturn(FlowSpec.builder().build()).when(dagManagementStateStore).getFlowSpec(any());
doNothing().when(dagManagementStateStore).tryAcquireQuota(any());
doReturn(true).when(dagManagementStateStore).releaseQuota(any());
}

public static TopologySpec buildNaiveTopologySpec(String specUriInString) {
String specStoreDir = "/tmp/specStoreDir";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

add comments

@arjun4084346 arjun4084346 changed the title delete deadline triggers in all hosts [GOBBLIN-2090] delete deadline triggers in all hosts Jun 17, 2024
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.

3 participants