[CSHARP-1531] Find operations should release connections back to the pool between calls to GetMore Created: 13/Jan/16  Updated: 20/Jan/16  Resolved: 14/Jan/16

Status: Closed
Project: C# Driver
Component/s: Connectivity
Affects Version/s: 2.2.1
Fix Version/s: 2.2.2

Type: Bug Priority: Major - P3
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The work that was done earlier to support using the Find command (when connected to a server that supports the Find command) inadvertently caused the connection to be kept checked out of the connection pool for the lifetime of the AsyncCursor.

Before this change the connection was released back to the pool between calls to GetMore. The prior behavior is considered desirable because it allows the connection to be used for other purposes in the meantime, increasing the throughput possible with a given number of connections.



 Comments   
Comment by Githook User [ 14/Jan/16 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1531: Force GetMores to use a new connection every time.
Branch: v2.2.x
https://github.com/mongodb/mongo-csharp-driver/commit/a2cf0332a3ce8cd6ad98acec46c9450034e7f5b0

Comment by Robert Stam [ 14/Jan/16 ]

The short term fix for version 2.2.2 of the driver is to force every GetMore to use a new connection regardless of what the original binding passed to the Execute method of FindOperation was. A longer term fix in a future version should respect the original binding, but that would require some API changes we don't want to make in a point release.

Comment by Githook User [ 14/Jan/16 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1531: Force GetMores to use a new connection every time.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/3d100d04440e01ec9ed9dd67d46efd9858ce0401

Generated at Wed Feb 07 21:39:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.