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

Refactor ReplicaSetMonitor to avoid duplicate work

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.1.0
    • Labels:
      None

      Refactor ReplicaSetMonitor such that work would not be duplicated. In particular, only allow a single thread to modify _nodes so we don't keep on calling isMaster unnecessarily (especially when several connections calls getMaster roughly the same time and _master was marked as invalid). SERVER-5110 did a little patch to mitigate this, but a redesign is needed to make the code cleaner (logic will be simplified once the invariant that only 1 thread is responsible for modifying _nodes) and avoid duplicating work.

            Assignee:
            Unassigned Unassigned
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: