Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-205

Specify that a batch size of 1 is translated to 2

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: None
    • None

      If the user specifies a batch size of 1, the driver must use a batch size of 2 for the initial query, because the server treats nToReturn of 1 in OP_QUERY the same as -1: it closes the cursor after the first batch.

      In PyMongo we override batch size of 1 with 2, not just for OP_QUERY but for OP_GET_MORE too.

      Let us specify that drivers use batch size 2 instead of 1 for OP_QUERY only, not for OP_GET_MORE.

      Let us also discover the history and intent of the server's quirky OP_QUERY behavior, and investigate whether the "find" command will act the same.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: