[JAVA-309] when choosing slave to read from, should take into account slaveDelay and possibly oplog status Created: 27/Mar/11  Updated: 21/Sep/16  Resolved: 21/Sep/16

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

Type: Improvement Priority: Major - P3
Reporter: Antoine Girbal Assignee: Unassigned
Resolution: Won't Fix Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to JAVA-2248 Allow users to set a limit on accepta... Closed

 Description   

If a server has a slavedelay, it should probably not be used for reads if possible.
Further, driver could take into account how uptodate a slave is, and avoid using one that is late.



 Comments   
Comment by Jeffrey Yemin [ 21/Sep/16 ]

Closing as Won't Fix, though some of the use cases will be satisfied by JAVA-2248

Comment by Idris Mokhtarzada [ 09/May/12 ]

The oplog part of this looks like it would be resolved by SERVER-3346.

Comment by Antoine Girbal [ 11/Mar/12 ]

as per doc, slaveDelay requires priority=0 and enforces hidden=true
So it will not be used for read operations by the driver.

As for oplog status, this would be much easier if it got reported by servers in isMaster response.
Otherwise there is too much work to do for the driver.
Also it can be tricky, at what point a driver needs to stop using a slave (and slave delay can appear artificially high at times)

Comment by Jeffrey Yemin [ 10/Mar/12 ]

Don't we already ignore servers with slavedelay?

Comment by Idris Mokhtarzada [ 14/Oct/11 ]

What's the status of this issue? Was it ever implemented?

In general, if you have a slaveDelay node specified as one of the hosts in your driver, will it try to read data from that node?

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