[JAVA-1473] findOne overload that takes only the value of the _id field does not apply read preference to mongos properly Created: 22/Sep/14  Updated: 15/Oct/14  Resolved: 23/Sep/14

Status: Closed
Project: Java Driver
Component/s: Query Operations
Affects Version/s: None
Fix Version/s: 2.12.4, 2.13.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   

DBCollection.findOne has an overload that takes just the value of the _id field and turns it into a regular query. But the code path that it takes does not apply the read preference properly when connected to a mongos.



 Comments   
Comment by Jeffrey Yemin [ 15/Oct/14 ]

Fix released in 2.12.4

Comment by Githook User [ 23/Sep/14 ]

Author:

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

Message: Made DBCollection.findOne overloads that take the _id value go through the same code path as the other findOne methods.
This fixes a bug where the read preference is not being correctly applied when connected to a mongos

JAVA-1473
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/6811555acf5458ccfef18dafc44272851f9ac696

Comment by Githook User [ 23/Sep/14 ]

Author:

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

Message: Made DBCollection.findOne overloads that take the _id value go through the same code path as the other findOne methods.
This fixes a bug where the read preference is not being correctly applied when connected to a mongos

JAVA-1473
Branch: 2.12.x
https://github.com/mongodb/mongo-java-driver/commit/58e6abfb9cac43204c6c424ef47709d8fb4d7468

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