[SERVER-12861] Introduce a maxStalenessMS option when querying secondaries Created: 24/Feb/14  Updated: 23/Jul/16  Resolved: 19/Jul/16

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.6.0-rc0
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Vincent Assignee: A. Jesse Jiryu Davis
Resolution: Duplicate Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-4936 Server support for "maxStalenessMS" r... Closed
Related
related to SERVER-3346 MAX SLAVE LAG - Features to provide a... Closed
is related to SERVER-4935 Mark node Recovering when replication... Closed
Participants:

 Description   

As most app, a lot of my queries (much more than I currently do) could be executed on secondaries if I knew they aren't more than X seconds behind the primary member of their replica set.
That why it would be really convenient to have a maxSlaveDelay settings or equivalent (the same way that we have a "readPref" setting for example) that would only select secondaries that have less than X seconds lag.

I believe this value needs to be cached somewhere to be blazing fast to retrieve. This value couldn't be updated in real time, but updated every 30 seconds or so would be more than enough in most cases.

I'm not sure about the details of the implementation, but you get the whole idea.



 Comments   
Comment by Ramon Fernandez Marina [ 23/Jul/16 ]

I have marked this ticket as a duplicate of SERVER-4936, since SERVER-3346 and this ticket were marked as a duplicate of each other.

Users interested in this feature can tune to SERVER-4936 for updates.

Regards,
Ramón.

Comment by Paul Ridgway [ 23/Jul/16 ]

Great - thanks

Comment by A. Jesse Jiryu Davis [ 22/Jul/16 ]

The related tickets are SERVER-8858, SERVER-24421, SERVER-24675, SERVER-24676. Sorry for the mess!

Comment by Paul Ridgway [ 22/Jul/16 ]

I'm just looking for something to track - the driver ticket is great for half of the puzzle but I'm struggling to see the corresponding Server ticket to know which release it is likely to hit etc?

Comment by A. Jesse Jiryu Davis [ 22/Jul/16 ]

It will be supported, and is mostly implemented in the server, however confusingly we handled the tickets related to it. Is there a specific question I can help you with that Jira isn't answering?

Comment by Paul Ridgway [ 22/Jul/16 ]

Thanks for coming back to me, however the related server tickets are closed as wont fix or dupe so it suggests its not being supported....

Comment by A. Jesse Jiryu Davis [ 22/Jul/16 ]

To track driver implementation of the feature, see DRIVERS-293. For server tasks related to this, follow the SERVER tickets listed as "related to" this one.

Comment by Paul Ridgway [ 22/Jul/16 ]

Ah I see - is there an associated ticket to track?

Comment by A. Jesse Jiryu Davis [ 22/Jul/16 ]

We've published a spec for driver and server behavior that will support this new read preference with MongoDB 3.4:

https://github.com/mongodb/specifications/commit/69630e72e30f774dbc2aef5e796effda94be2fb2

Comment by Paul Ridgway [ 22/Jul/16 ]

Looks like the declared duplicate (SERVER-3346) and this ticket have been closed a Dupes. 3346 references another ticket around the replication implications but its not the same as the max staleness concept...

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