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

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.3.0
    • 3.11.0
    • Change Streams
    • None
    • Fully Compatible
    • Not Needed

    Description

      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.

      Attachments

        Activity

          People

            valentin.kovalenko@mongodb.com Valentin Kavalenka
            valentin.kovalenko@mongodb.com Valentin Kavalenka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: