Chen Guo created GOBBLIN-963:
--------------------------------
Summary: 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: New Feature
Reporter: Chen Guo
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)