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

Optimize reading InputChannel state

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • 1.12.0
    • Runtime / Task
    • None

    Description

      Curently, channel state is read not sequentially.

      Inverting control would make it more efficient.

      Current call chain: 

       StreamTask.readRecoveredChannelState ->  strictly after reading output; when state is *consumed*, requests partitions
          SingleInputGate.readRecoveredState -> submits a task to an executor from main task thread; loop through special channels
              RecoveredInputChannel.readRecoveredState  -> loop while has data; buffer = bufferManager.requestBufferBlocking();
                      where bufferManager = new BufferManager(inputGate.getMemorySegmentProvider(), this, 0);
                  ChannelStateReader.readInputData  
      

      Proposed call chain:

      StreamTask.readRecoveredChannelState ->  strictly after reading output; when state is *consumed*, requests partitions
          ChannelStateReader.readInputData (another thread, maybe same executor, maybe change injection)
              loop through state handles ordererd by handle, offset
              request buffer from channel
              pass buffer to RecoveredInputChannel.onRecoveredStateBuffer
      

        Depends on FLINK-18989

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: