[
https://issues.apache.org/jira/browse/GOBBLIN-1836?focusedWorklogId=862484&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-862484
]
ASF GitHub Bot logged work on GOBBLIN-1836:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 26/May/23 18:53
Start Date: 26/May/23 18:53
Worklog Time Spent: 10m
Work Description: ZihanLi58 commented on code in PR #3699:
URL: https://github.com/apache/gobblin/pull/3699#discussion_r1207200903
##########
gobblin-cluster/src/main/java/org/apache/gobblin/cluster/GobblinHelixTask.java:
##########
@@ -219,6 +228,7 @@ public void cancel() {
log.info("Gobblin helix task cancellation invoked for jobId {}.", jobId);
if (this.task != null ) {
try {
+ this.isCanceled = true;
Review Comment:
I set it earlier to make sure when line 171 "this.task.run();" finishes, it
can see the flag to be set already.
As cancel and run are two method runs in different threads, so want to avoid
race conditions here.
If we set it earlier, the worst case is even task finish successfully, as
long as we tried to call cancel, we will return as cancel. I think it's
acceptable, but let me you WDYT.
Issue Time Tracking
-------------------
Worklog Id: (was: 862484)
Time Spent: 40m (was: 0.5h)
> Ensuring Task Reliability: Handling Job Cancellation and Graceful Exits for
> Error-Free Completion
> -------------------------------------------------------------------------------------------------
>
> Key: GOBBLIN-1836
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1836
> Project: Apache Gobblin
> Issue Type: Improvement
> Reporter: Zihan Li
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> In our system, when a helix disconnection occurs, we take the necessary step
> to cancel the ongoing job. Furthermore, when we opt for a graceful exit, we
> ensure that no exception is thew and we mark the task as complete. However,
> it is important to note that due to this graceful exit, the task cannot be
> retried accurately.
> So we need to introduce a cancel flag to make sure we return the correct task
> status
--
This message was sent by Atlassian Jira
(v8.20.10#820010)