[JAVA-498] When using DB.requestStart, reads are not guaranteed to use the same connection Created: 23/Dec/11  Updated: 18/Jun/12  Resolved: 05/Apr/12

Status: Closed
Project: Java Driver
Component/s: Cluster Management
Affects Version/s: None
Fix Version/s: 2.8.0

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

Issue Links:
Depends

 Description   

There are a number of issues with DB.requestStart/requestDone:

  • If client reads from a primary or secondary, subsequent reads may use a different connection. Every read goes back to the pool for a new connection (which could potentially block or fail, depending on MongoOptions.maxWaitTime)
  • If client reads from a secondary (any, or tagged), there is no guarantee that subsequent reads will go to the same secondary
  • If client reads from a secondary (any, or tagged), and then writes, subsequent reads will go the primary regardless of the read preference


 Comments   
Comment by Jeffrey Yemin [ 18/Jun/12 ]

Closing for 2.8.0 release.

Comment by Jeffrey Yemin [ 05/Apr/12 ]

Adding this manually since it wasn't added automatically:

Author:

{u'login': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: JAVA-498: Reserving connection after requestStart for reads now as well as writes
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/f8c5ce5b19ae0912e59e664adbf93df0988bc162

Generated at Thu Feb 08 08:52:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.