-
Type: New Feature
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
When using cursors or transactions, the connection itself (not just the server selection criteria) must be pinned, i.e. the connection removed from the pool for the duration of usage of the cursor or transaction, and only returned afterwards [spec].
- For cursors, the connection must remain pinned and used for all getMore commands until the server returns cursor ID 0 or close is called on the cursor (i.e. it's dropped).
- For transactions, the connection pinning follows the same logic as sharded transaction mongos pinning.
- Whether a connection is checked out for cursor pinning, transaction pinning, or otherwise needs to be tracked to enable detailed error messages.