Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-7623

Detecting whether an operator is restored doesn't work with chained state

    XMLWordPrintableJSON

Details

    Description

      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:

      final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
      
      env
      		.addSource(new MaSource()).uid("source-1")
      		.flatMap(new MaFlatMap()).uid("flatMap-1");
      
      env.execute("testing");
      

      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.

      Attachments

        1. StreamingJob.java
          3 kB
          Aljoscha Krettek

        Issue Links

          Activity

            People

              pnowojski Piotr Nowojski
              aljoscha Aljoscha Krettek
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: