[
https://issues.apache.org/jira/browse/GOBBLIN-1721?focusedWorklogId=818094&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-818094
]
ASF GitHub Bot logged work on GOBBLIN-1721:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 18/Oct/22 17:27
Start Date: 18/Oct/22 17:27
Worklog Time Spent: 10m
Work Description: hanghangliu commented on code in PR #3580:
URL: https://github.com/apache/gobblin/pull/3580#discussion_r998519055
##########
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixJobScheduler.java:
##########
@@ -431,8 +431,15 @@ private void
cancelJobIfRequired(DeleteJobConfigArrivalEvent deleteJobArrival) t
if (jobNameToWorkflowIdMap.containsKey(deleteJobArrival.getJobName())) {
String workflowId =
jobNameToWorkflowIdMap.get(deleteJobArrival.getJobName());
TaskDriver taskDriver = new TaskDriver(this.jobHelixManager);
- taskDriver.waitToStop(workflowId, this.helixJobStopTimeoutMillis);
- LOGGER.info("Stopped workflow: {}", deleteJobArrival.getJobName());
+ // Cancel the job by calling either Delete or Stop Helix API
+ if (PropertiesUtils.getPropAsBoolean(jobConfig,
GobblinClusterConfigurationKeys.CANCEL_HELIX_JOB_BY_DELETE,
+
GobblinClusterConfigurationKeys.DEFAULT_CANCEL_HELIX_JOB_BY_DELETE)) {
+ taskDriver.delete(workflowId);
+ LOGGER.info("Canceling Helix workflow: {} through delete API",
deleteJobArrival.getJobName());
+ } else {
Review Comment:
Updated for all waitToStop use cases
Issue Time Tracking
-------------------
Worklog Id: (was: 818094)
Time Spent: 50m (was: 40m)
> Give option to cancel helix workflow through Delete API to avoid job hanging
> ----------------------------------------------------------------------------
>
> Key: GOBBLIN-1721
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1721
> Project: Apache Gobblin
> Issue Type: Bug
> Components: gobblin-cluster
> Reporter: Hanghang Liu
> Assignee: Hung Tran
> Priority: Major
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Currently when we receive a job restart(handleUpdateJobConfigArrival),
> GobblinHelixJobLauncher will firstly callĀ helixTaskDriver.waitToStop to stop
> the workflow, then initiate the new one. We observe the behavior of Helix
> taking exceptionally long to stop the workflow, making the job state staying
> in STOPPING status. This will make waitToStop timeout and throw exception all
> the time, making the new flow never be able to launch.
> We can utilize Delete API in this case since our job is stateless for Helix,
> to avoid job hanging.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)