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

Support batchSize getMore option for command cursors

    XMLWordPrintable

    Details

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

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: