[SERVER-41543] make RSM::getHostsOrRefresh return unpreferred hosts last Created: 05/Jun/19  Updated: 06/Dec/22  Resolved: 25/Apr/22

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Mira Carey Assignee: Backlog - Service Architecture
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-41133 Add TaskExecutor::scheduleRemoteComma... Closed
is related to SERVER-41134 Add RSM::findHostsWithMaxWait Closed
Assigned Teams:
Service Arch
Sprint: Service Arch 2019-07-01
Participants:

 Description   

Right now the ReplicaSetMonitor::getHostsOrRefresh only returns the non-preferred option (for PrimaryPreferred and SecondaryPreferred) when the preferred options are completely untargettable.

But, after SERVER-41133, we'll be able to take advantage of the lists of hosts returned in SERVER-41134, and we can weaken our notion of "preferred" from "is targettable" to "has a connection available"

I.e. if matchingHosts =

{ secondary1, secondary2, primary }

(where 50% of the time we swap secondary 1 and secondary 2) we have the technology to select a secondary, falling back to the primary, in the order a connection becomes available. In a system with "enough" connections, that should send all traffic to secondaries, and only route to the primary when we have no connections available. I think this weakening is inline with the rest of the work in PM-856



 Comments   
Comment by Lauren Lewis (Inactive) [ 21/Dec/21 ]

We haven’t heard back from you in at least 1 year, so I'm going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket.

Comment by Ratika Gandhi [ 17/Dec/19 ]

cc.garaudy.etienne

Comment by Mira Carey [ 05/Jun/19 ]

If we were to pursue PM-856 in the drivers, this change would probably also make sense (I.e. weakening XXXPreferred read preferences)

Generated at Thu Feb 08 04:58:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.