Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-4007

PyMongo incorrectly sets exhaustAllowed on getMores when connected to Serverless or load balanced mode

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.6
    • Affects Version/s: None
    • Component/s: None
    • None

      PyMongo incorrectly sets exhaustAllowed on getMores when connected to Serverless or load balanced mode. This means regular find/aggregate cursors may be unexpectedly upgraded to exhaust cursors, like in PYTHON-3943.

      The bug is here: https://github.com/mongodb/mongo-python-driver/blob/992d1507e7a49292b555cc0201d95d49234c6228/pymongo/message.py#L567-L569

                  spec = self.as_command(conn, apply_timeout=True)[0]
                  if self.conn_mgr:  # <---- This should be something like "if self.conn_mgr and self.exhaust"
                      flags = _OpMsg.EXHAUST_ALLOWED
      

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: