Roman Khachatryan created FLINK-20107:
-----------------------------------------

             Summary: Issues with setting InputChannel.statePersister 
                 Key: FLINK-20107
                 URL: https://issues.apache.org/jira/browse/FLINK-20107
             Project: Flink
          Issue Type: Bug
          Components: Runtime / Checkpointing, Runtime / Network
    Affects Versions: 1.12.0
            Reporter: Roman Khachatryan
            Assignee: Roman Khachatryan
             Fix For: 1.12.0


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
 # Not set on RemoteInputChannel when converting from UnknownChannel
 # 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



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to