`ChangeStreamPublisher` may lose change events when retrying `getMore`

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.3.0
    • Affects Version/s: 3.11.0
    • Component/s: Change Streams
    • None
    • None
    • Fully Compatible
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      This bug description is a result of investigating JAVA-4155. The code

      cursor.next(callback);
      cachePostBatchResumeToken(cursor);
      
      cursor.tryNext(callback);
      cachePostBatchResumeToken(cursor);
      

      in AsyncChangeStreamBatchCursor.java results in having a race condition: resumeToken may not yet be known when retrying the next/tryNext operation.

              Assignee:
              Valentin Kavalenka
              Reporter:
              Valentin Kavalenka
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: