[ 
https://issues.apache.org/jira/browse/GOBBLIN-1078?focusedWorklogId=406374&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-406374
 ]

ASF GitHub Bot logged work on GOBBLIN-1078:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Mar/20 16:30
            Start Date: 19/Mar/20 16:30
    Worklog Time Spent: 10m 
      Work Description: sv2000 commented on issue #2919: [GOBBLIN-1078] 
Coordination between task cancel and initialization in Helix Task
URL: 
https://github.com/apache/incubator-gobblin/pull/2919#issuecomment-601279473
 
 
   @autumnust - On thinking more about the synchronization problem between 
GobblinMultiTaskAttempt#run() and cancel() methods, I think the following 
strategy might work. You can create a countdownLatch object that is shared 
between the run() and cancel() threads. When a cancel() is invoked, the 
countDownLatch is incremented. The cancel() may proceed to perform other 
actions but before it returns, it blocks until this latch is down to 0. The 
run() thread on the other hand, detects that the latch has been incremented, 
cancels the tasks submitted to the task executor, decrements the latch and 
returns. This should solve the synchronization issues between the threads 
without needing a lock/condition variable. 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 406374)
    Time Spent: 2h 20m  (was: 2h 10m)

> Coordination between task cancel and task initialization in Helix
> -----------------------------------------------------------------
>
>                 Key: GOBBLIN-1078
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1078
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: Lei Sun
>            Priority: Major
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to