Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-41543

make RSM::getHostsOrRefresh return unpreferred hosts last



    • Type: Improvement
    • Status: In Code Review
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 4.3 Desired
    • Component/s: Internal Code
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Service Arch 2019-07-01


      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


          Issue Links



              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: