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

Refactor ReplicaSetMonitor to avoid duplicate work

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.1.0
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: