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

Make RemoteCommandTargeter (and ReplicaSetMonitor) asynchronous

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • None
    • None
    • Sharding
    • None
    • ALL

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: