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

Make RemoteCommandTargeter (and ReplicaSetMonitor) asynchronous

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • ALL

      The RemoteCommandTargeter implementation builds on top of the ReplicaSetMonitor and exposes a synchronous findHost call, which may block on network 'isMaster' call if a master host is not yet known, or if it has been deemed unavailable.

      We use findHost in various places where blocking is undesirable (such as while holding the AsyncResultsMerger's mutex).

      We should make findHost support asynchronous interface so that if a host of certain read preference is not yet available it will not block, but give an event which can be listened on.

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: