Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-13409

PublisherManager may concurrently invoke segmentComplete and onNext

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 14.0.0.Dev01
    • None
    • Core
    • None

      The (Local|Cluster)PublisherManager returns a SegmentCompletionPublisher which has a subscribe method that takes a Subscriber and consumers to be notified of segment completion or lost. These clasess were designed with the fact that the onNext and segment completion or lost would never be invoked concurrently.

      Unfortunately, if the onNext is offloaded to a different thread then it is possible for this to occur causing an issue in PublisherHandler which keeps track of remote requests and responses to get in an incorrect state.

      Instead we should change the API of (Local|Cluster)PublisherManager to have a subscribe that takes some sort of wrapper where each event may be an entry or a segment completion or lost. This way callers can more easily handle asynchronous operations when handling the Publisher.

            Unassigned Unassigned
            wburns@redhat.com Will Burns
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: