Legacy driver sends nToReturn of -1 for OP_GET_MORE for an aggregation with batch size of 1

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 2.14.3
    • Affects Version/s: 2.14.0
    • Component/s: Query Operations
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The following code:

         collection.aggregate(pipeline, AggregationOptions.builder()
                                                 .batchSize(1)
                                                 .build())
      

      will send nToReturn of -1 to OP_GET_MORE when fetching the second batch of documents.

      On server 3.4, this results in a uassert:

      AssertionException handling request, closing client connection: 34419 Invalid ntoreturn for OP_GET_MORE: -1
      

      The driver should be fixed so that it sends nToReturn of 1 instead.

              Assignee:
              Jeffrey Yemin
              Reporter:
              Jeffrey Yemin
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: