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

Issues with setting InputChannel.statePersister

    XMLWordPrintableJSON

Details

    Description

      ChannelStatePersister is a non-final field in InputChannel.

      The need for injection is caused by different places, where network- and state- related objects are created (task executor vs stream task).

      It is set on remote and local channels upon requesting partitions, after converting unknown or recovered channel.

       Issues

      1. Not set on RemoteInputChannel when converting from UnknownChannel
      2. No visibility guarantee: written by task thread without any (explicit) synchronization, read by network thread (checkForBarrier)

      I see that "final" channels (both remote and local) are created only when the writer is known (partitions requested).

      So we can just make it final in "final" channels and pass from recovered/unknown. For that,

      • need to add to UnknownChannel
      • no need to make it volatile/guarded because in "non-final" channels it's accessed only by the task thread; and in "final" channels it will be final

      Attachments

        Issue Links

          Activity

            People

              roman Roman Khachatryan
              roman Roman Khachatryan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: