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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.11.0
    • Fix Version/s: 4.3.0
    • Component/s: Change Streams
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Documentation Changes:
      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

          Issue Links

            Activity

              People

              Assignee:
              valentin.kovalenko Valentin Kavalenka
              Reporter:
              valentin.kovalenko Valentin Kavalenka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: