[
https://issues.apache.org/jira/browse/GOBBLIN-1863?focusedWorklogId=874115&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-874115
]
ASF GitHub Bot logged work on GOBBLIN-1863:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 01/Aug/23 19:55
Start Date: 01/Aug/23 19:55
Worklog Time Spent: 10m
Work Description: umustafi commented on code in PR #3727:
URL: https://github.com/apache/gobblin/pull/3727#discussion_r1281090842
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java:
##########
@@ -455,6 +471,33 @@ public synchronized void setActive(boolean active) {
}
}
+ /**
+ * Used by the DagManager to launch a new execution for a flow action event
loaded from the DagActionStore upon
+ * setting this instance of the DagManager to active. Because it may be a
completely new DAG not contained in the
+ * dagStore, we compile the flow to generate the dag before calling
addDag(), handling any errors that may result in
+ * the process.
+ */
+ public void handleLaunchFlowEvent(DagActionStore.DagAction action) {
+ FlowId flowId = action.getFlowId();
+ FlowSpec spec;
+ try {
+ URI flowUri = FlowSpec.Utils.createFlowSpecUri(flowId);
+ spec = (FlowSpec) flowCatalog.getSpecs(flowUri);
+ Optional<Dag<JobExecutionPlan>> optionalJobExecutionPlanDag =
orchestrator.handleChecksBeforeExecution(spec);
Review Comment:
Moving this function to the `Orchestrator`, does not actually change the
code pattern here since there's only a bit of wrapper code (mainly to get the
spec corresponding to the `dagAction`) around the `Orchestrator` helper funcs
that it relies on. It's more clear to keep it here since the use case is
`DagManager` specific
Issue Time Tracking
-------------------
Worklog Id: (was: 874115)
Time Spent: 2h 40m (was: 2.5h)
> Multi-Active Launch Job Related Issues
> --------------------------------------
>
> Key: GOBBLIN-1863
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1863
> Project: Apache Gobblin
> Issue Type: Bug
> Reporter: Urmi Mustafi
> Priority: Major
> Time Spent: 2h 40m
> Remaining Estimate: 0h
>
> * DagManager check leader status before addDag bc calling this method from
> non-leader hosts throws a NPE which may caused failed dag event to be emitted
> * also handle LAUNCH type events upon leader change and setting a new
> participant DagManager to be active. Failing to handle these events may be
> causing missed flow launches on any leader change or restart.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)