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

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

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

      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.kovalenko@mongodb.com Valentin Kavalenka
            Reporter:
            valentin.kovalenko@mongodb.com Valentin Kavalenka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: