Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

we should at least make sure the different attempt of a same task to have the same inputs


In my opinion we need deterministic, especially when a task rerun, the output should as same as the previous version. Today's logic might skip the split that previous task processed and assign a different split, this will lead incorrect result.

我很详细的看了,FLINK-10205以及里面相关pr的讨论https://github.com/apache/flink/pull/6684,https://github.com/apache/flink/pull/8125

https://issues.apache.org/jira/browse/FLINK-10205

Before moving forward I'd like to understand why it is strictly necessary that the failed tasks reprocesses the same set of input splits. 

现在的做法:If we assume that our sources are stateless, then simply returning the input splits to the assigner and letting the next idling task take it should work.

till 曾经提出In the batch case, this should not be a problem because it should not matter which tasks processes which input split. If a failure occurs and some other task takes over the failed input splits, it would as if this task had processed these input splits from the very beginning.但是这个在预测执行的情况下,肯定是不对的。

目前的情况仅仅是You're right that in order to support fine grained recovery for batch jobs, we need at least to return the input splits of the failed tasks.只不过是return了,但是没有保证failover之后,消费的inputsplit还是一样的。

目前的处理方法就是till说的So far I'm not convinced that something would break if we simply return the InputSplits to the InputSplitAssigner.,但是这样在预测执行的情况下是不行的。


till有个建议就是We could, for example, add a new interface which needs to be implemented by an InputSplitAssigner to support fine grained recovery. Otherwise, such a failure will result into a global failover.


有个人说 I think in most cases, it is ok the split on failed task taken over by other tasks and it is more friendly for failover.
But for some special cases, it is not ok, because the assigner can be customized, all of the assignment of input split should comes from the assigner implemented.
eg: when the assigner implemented to make sure each task processes the same number of input splits, we should not allow the input splits of failed task taken over by other task.


So, I will change,,不要再把inputsplit给return给assign了,而是,清空index,记录每个execution消费到list<InputSplit>里面的第几个index了,也就是记录下标,然后failover以后,就把下标清0,然后多个execution也可以玩得转,然后这里再画一张图,把这个过程说清楚。,不要再把inputsplit给return给assign了,而是,清空index,记录每个execution消费到list<InputSplit>里面的第几个index了,也就是记录下标,然后failover以后,就把下标清0,然后多个execution也可以玩得转,然后这里再画一张图,把这个过程说清楚。For implementation, we can record the input split assigned to the task on assigning, and this is the most general way


Manage middle ResultPartition 

...