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

Simplify Availability Future Model in Base Connector

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 1.12.0
    • Connectors / Common
    • None

    Description

      The current model implemented by the FutureNotifier and the SourceReaderBase has a shortcoming:

      • It does not support availability notifications where the notification comes before the check. IN that case the notification is lost.
      • One can see the added complexity created by this model also in the SourceReaderBase#isAvailable() where the returned future needs to be "post-processed" and eagerly completed if the reader is in fact available. This is based on queue size, which makes it hard to have other conditions.

      I think we can do something that is both easier and a bit more efficient by following a similar model as the org.apache.flink.runtime.io.AvailabilityProvider.AvailabilityHelper.

      Furthermore, I believe we can win more efficiency by integrating this better with the FutureCompletingBlockingQueue.

      I suggest to do a similar implementation as the AvailabilityHelper directly in the FutureCompletingBlockingQueue.

      Attachments

        Activity

          People

            sewen Stephan Ewen
            sewen Stephan Ewen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: