Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-1109

Support batchSize getMore option for command cursors

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.4.0-RC2, 1.4.0
    • Affects Version/s: None
    • Component/s: None
    • None

      After a command cursor is created, libmongoc assigns the maxAwaitTimeMS and batchSize options to the command cursor. I believe we have two options:

      • Instead of adding a Command constructor option, we can inspect the command document for a batchSize option earlier in phongo_execute_command() and apply it in the same place as above. This requires no changes in PHPLIB. It also means that the same batchSize value will apply to the original command and subsequent getMore.

      Note: the second choice (inferring batchSize may have implications for PHPLIB-312, where a user had asked if batchSize applied to getMore at all; however, they did not specifically request the ability to differentiate batchSize options for the initial aggregate and subsequent getMore commands.

      I'm inclined to go with the second solution (inferring batchSize) as it requires minimal changes to the PHPC API or PHPLIB. It also allows us the opportunity to introduce a Command constructor option later, which would take precedence.

            Assignee:
            katherine.walker@mongodb.com Katherine Walker (Inactive)
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: