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

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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.14.3
    • Affects Version/s: 2.14.0
    • Component/s: Query Operations
    • Labels:
      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:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: