[ 
https://issues.apache.org/jira/browse/FLINK-7623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16210951#comment-16210951
 ] 

Piotr Nowojski edited comment on FLINK-7623 at 10/20/17 9:42 AM:
-----------------------------------------------------------------

As [~srichter] suggested I have checked for couple of more cases and current 
({{1.4-SNAPSHOT}}) behaviour is as follows:
# Operator participated in checkpoint, data written -> {{isRestored == true}}
# Operator participated in checkpoint, but did not receive state after 
rescaling -> {{isRestored == true}}
# Operator participated in checkpoint, nothing checkpointed -> {{isRestored == 
true}}
# Operator never participated in checkpoint, or has a new uid -> {{isRestored 
== false}}

EDIT: fixed one mistake - for case when nothing was checkpointed 
{{isRestore()}} returns true at the moment.


was (Author: pnowojski):
As [~srichter] suggested I have checked for couple of more cases and current 
({{1.4-SNAPSHOT}}) behaviour is as follows:
# Operator participated in checkpoint, data written -> {{isRestored == true}}
# Operator participated in checkpoint, but did not receive state after 
rescaling -> {{isRestored == true}}
# Operator never participated in checkpoint, or has a new uid -> {{isRestored 
== false}}
# Operator participated in checkpoint, nothing checkpointed -> {{sRestored == 
false}}

I think that this behaviour makes sense.

> Detecting whether an operator is restored doesn't work with chained state
> -------------------------------------------------------------------------
>
>                 Key: FLINK-7623
>                 URL: https://issues.apache.org/jira/browse/FLINK-7623
>             Project: Flink
>          Issue Type: Bug
>          Components: DataStream API, State Backends, Checkpointing
>    Affects Versions: 1.4.0, 1.3.2
>            Reporter: Aljoscha Krettek
>            Assignee: Piotr Nowojski
>            Priority: Blocker
>             Fix For: 1.4.0, 1.3.3
>
>         Attachments: StreamingJob.java
>
>
> Originally reported on the ML: 
> https://lists.apache.org/thread.html/22a2cf83de3107aa81a03a921325a191c29df8aa8676798fcd497199@%3Cuser.flink.apache.org%3E
> If we have a chain of operators where multiple of them have operator state, 
> detection of the {{context.isRestored()}} flag (of {{CheckpointedFunction}}) 
> does not work correctly. It's best exemplified using this minimal example 
> where both the source and the flatMap have state:
> {code}
> final StreamExecutionEnvironment env = 
> StreamExecutionEnvironment.getExecutionEnvironment();
> env
>               .addSource(new MaSource()).uid("source-1")
>               .flatMap(new MaFlatMap()).uid("flatMap-1");
> env.execute("testing");
> {code}
> If I do a savepoint with these UIDs, then change "source-1" to "source-2" and 
> restore from the savepoint {{context.isRestored()}} still reports {{true}} 
> for the source.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to