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

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

                Author: ASF GitHub Bot
            Created on: 19/Nov/19 18:17
            Start Date: 19/Nov/19 18:17
    Worklog Time Spent: 10m 
      Work Description: enjoyear commented on pull request #2818: [GOBBLIN-963] 
Remove duplicated copies of TaskContext/TaskState when constructing 
TaskIFaceWrapper
URL: https://github.com/apache/incubator-gobblin/pull/2818#discussion_r348089244
 
 

 ##########
 File path: 
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/GobblinMultiTaskAttempt.java
 ##########
 @@ -78,8 +78,7 @@
     /**
      * Commit {@link GobblinMultiTaskAttempt} immediately after running is 
done.
      */
-    IMMEDIATE,
-    /**
+    IMMEDIATE, /**
 
 Review comment:
   Just realized that adding one more empty line will fix it. Will make the 
change.
 
----------------------------------------------------------------
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:
[email protected]


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

    Worklog Id:     (was: 346159)
    Time Spent: 50m  (was: 40m)

> Inconsistent TaskContext/TaskState created for TaskIFaceWrapper in 
> GobblinMultiTaskAttempt
> ------------------------------------------------------------------------------------------
>
>                 Key: GOBBLIN-963
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-963
>             Project: Apache Gobblin
>          Issue Type: Bug
>            Reporter: Chen Guo
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Currently in GobblinMultiTaskAttempt, when we call createTaskRunnable, we 
> rely on a TaskFactory to create a task and return a wrapper for that task. 
> However, when we create the wrapper, we initialized the TaskContext twice. 
>  # For the task creation
>  # For the task wrapper creation
> These two TaskContexts, which generate two copies of TaskState, will cause 
> inconsistency in the following operation. The task state update within the 
> task won't be reflected in TaskWrapper.
>  
> Specifically, this is the buggy line of code
> {code:java}
> return new TaskIFaceWrapper(taskFactoryOpt.get().createTask(new 
> TaskContext(workUnitState)),
>  new TaskContext(workUnitState), countDownLatch, this.taskStateTracker);
> {code}
> Ideally, we should create the TaskContext once, and reuse the same 
> TaskContext.
>  
>  



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

Reply via email to