[JAVA-2659] The async MongoClient does not enable check for latency window required by server selection spec Created: 10/Nov/17  Updated: 29/Oct/23  Resolved: 09/Feb/18

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

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


 Description   

The sync driver registers a LatencyMinimizingServerSelector instance with the cluster, but the async driver does not, and therefore does not implement that part of the server selection specification.



 Comments   
Comment by Githook User [ 09/Feb/18 ]

Author:

{'email': 'ross.lawley@gmail.com', 'name': 'Ross Lawley', 'username': 'rozza'}

Message: Support latencyThreshold in ClusterSettings.

JAVA-2659
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/34dd1d38b82e51bf61ac320c19ae81cacbc18991

Comment by Jeffrey Yemin [ 05/Feb/18 ]

Since latency minimization is part of the server selection spec it should be enabled in all cases, and the configurable serverSelector should be placed on top of it, as it currently is with com.mongodb.MongoClient.

Comment by Ross Lawley [ 05/Feb/18 ]

Most of this is already configurable via `ClusterSettings.Builder#serverSelector()`. `LatencyMinimizingServerSelector` and `CompositeServerSelector` are already public, so it is manually configurable.

However, the connection string isn't automatically configured and that requires plumbing in.

Comment by Jeffrey Yemin [ 02/Feb/18 ]

Looks like we'll need to add a ServerSelector to MongoClientSettings to mimic work done in MongoClientOptions for JAVA-2666.

Comment by Jeffrey Yemin [ 29/Jan/18 ]

Also check this for the newly added synchronous MongoClients.create methods.

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