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

Fix maxAwaitTime test for AggregateOperation to make sure the pipeline creates a tailable cursor

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.8.0
    • Affects Version/s: None
    • Component/s: Test Coverage
    • None

      Updated Description

      The server does not support setting maxTimeMS on getMore unless the cursor is tailable. This is exposed via the maxAwaitTime option for aggregate helper.

      Update the test for this to ensure that the aggregate pipeline creates a tailable cursor by adding a $changeStream stage.

      Original Description

      Latest MongoD's reporting errors and failing in Evergreen.

      Query failed with error code 2 and error message 'cannot set maxTimeMS on getMore command for a non-awaitData cursor'
      

      Commands sent to server:

      {
        "aggregate" : "JAVA2827",
        "pipeline" : [],
        "cursor" : {
          "batchSize" : 2
        },
        "$db" : "test",
        "$readPreference" : {
          "mode" : "primaryPreferred"
        }
      }
      
      {
        "getMore" : 9162929968295230509,
        "collection" : "JAVA2827",
        "batchSize" : 2,
        "maxTimeMS" : 5000,
        "$db" : "test",
        "$readPreference" : {
          "mode" : "primaryPreferred"
        }
      }
      

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            ross@mongodb.com Ross Lawley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: