[JAVA-2071] API documentation for MongoClient 3.0+ should describe mongos round-robin selection Created: 27/Dec/15  Updated: 19/Oct/16  Resolved: 09/Jun/16

Status: Closed
Project: Java Driver
Component/s: Documentation
Affects Version/s: 3.2.0
Fix Version/s: 3.3.0

Type: Improvement Priority: Minor - P4
Reporter: Roger McCoy (Inactive) Assignee: Jeffrey Yemin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In the API documentation for the 3.0+ MongoClient options:
http://api.mongodb.org/java/3.0/?com/mongodb/MongoClientOptions.html

When using a List of servers it states:

If this is a list of mongos servers, it will pick the closest (lowest ping time) one to send all requests to, and automatically fail over to the next server if the closest is down.

But with 3.0+ this is no longer true, as described in
MongoClientOptions.getLocalThreshold():

Gets the local threshold. When choosing among multiple MongoDB servers to send a request, the MongoClient will only send that request to a server whose ping time is less than or equal to the server with the fastest ping time plus the local threshold.



 Comments   
Comment by Githook User [ 09/Jun/16 ]

Author:

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

Message: JAVA-2071: Update Mongo and MongoClient constructor documentation to describe random server selection algorithm
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/1b949e5aaa3793ffe7091e7582607f7008898df1

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