-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Unknown
-
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
- causes
-
PYTHON-3943 Serverless failure - TestUnifiedRunCursorCommand::test_returns_pinned_connections_to_the_pool_when_the_cursor_is_exhausted
-
- Closed
-