Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-5114

ResizingByteBufferFlux - shouldn't need locks

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Reactive Streams
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      As per valentin.kovalenko@mongodb.com observations in #1178

      I am not sure synchronization is needed here at all, because of the following rules:

      • Subscription #1: Subscription.request and Subscription.cancel MUST only be called inside of its Subscriber context.
      • Subscriber #7: A Subscriber MUST ensure that all calls on its Subscription's request and cancel methods are performed serially.

      But, because I am not sure it is not needed (I may be missing or misunderstanding something), I preserved the synchronization.

      Since upgrading the reactor to 2022.0.0 - the compliance with the reactive streams spec should enable the removal of the lock / synchronization.

            Assignee:
            Unassigned Unassigned
            Reporter:
            ross@mongodb.com Ross Lawley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: