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

[Spike] Eliminate race conditions in getMore tests after aggregate operation

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • None
    • Java Drivers

      Objective: Investigate if unified reactive ChangeStream tests can be made to comply with unified JSON commands order, avoiding race conditions.

      Background: Race conditions occur when executing an aggregate command followed immediately by getMore commands, leading to test failures in the "expected events" stage.

      Partial Workaround: There is a partial workaround implemented in JAVA-5356 . This approach waits for the BatchCursor creation or catches errors if the creation fails. However, it does not address the issue: it does not suspend operations after an aggregate command until "next" or "hasNext" is called on SyncMongoCursor.

      Required Investigation:

      • Determine if it's feasible to enforce command order/a pause in reactive streams post-aggregate operation until a specific trigger (like "next" or "hasNext") in SyncMongoCursor.

            Assignee:
            Unassigned Unassigned
            Reporter:
            slav.babanin@mongodb.com Slav Babanin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: