[
https://issues.apache.org/jira/browse/GOBBLIN-1702?focusedWorklogId=807217&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-807217
]
ASF GitHub Bot logged work on GOBBLIN-1702:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 08/Sep/22 23:25
Start Date: 08/Sep/22 23:25
Worklog Time Spent: 10m
Work Description: hanghangliu commented on code in PR #3556:
URL: https://github.com/apache/gobblin/pull/3556#discussion_r966499685
##########
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/HelixUtils.java:
##########
@@ -278,9 +278,12 @@ static void waitJobCompletion(HelixManager helixManager,
String workFlowName, St
case STOPPING:
log.info("Waiting for job {} to complete... State - {}", jobName,
jobState);
Thread.sleep(TimeUnit.SECONDS.toMillis(1L));
+ if (stoppingStateEndTime == 0) {
+ stoppingStateEndTime = currentTimeMillis +
stoppingStateTimeoutInSeconds * 1000;
+ }
// Workaround for a Helix bug where a job may be stuck in the
STOPPING state due to an unresponsive task.
- if (System.currentTimeMillis() > stoppingStateEndTime) {
- log.info("Deleting workflow {}", workFlowName);
+ if (stoppingStateEndTime != 0 && System.currentTimeMillis() >
stoppingStateEndTime) {
Review Comment:
Updated and changed the stoppingStateEndTime to a Long obj
Issue Time Tracking
-------------------
Worklog Id: (was: 807217)
Time Spent: 50m (was: 40m)
> Fix Bug when wait and checking helix job state till completion
> --------------------------------------------------------------
>
> Key: GOBBLIN-1702
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1702
> Project: Apache Gobblin
> Issue Type: Bug
> Components: gobblin-cluster
> Reporter: Hanghang Liu
> Assignee: Hung Tran
> Priority: Major
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Currently the HelixUtils.waitJobCompletion() has a bug when hob in STOPPING
> state, it immediately try to delete it, instead of waiting the job itself to
> transit to STOPPED state, due to the stoppingStateEndTime is not set
> correctly.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)