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

Fix race with async getHosts request and concurrent topology change

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.1, 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • None

      See the steps in "Steps To Reproduce" below.

      A fix for this is to invoke server selection at the time of step 4 with a fresh view of the topology while synchronizing with the TopologyManager.

      The topology views (and corresponding topology change events) are serialized, so at step 4 we would either see T0 or T and would block any future topology changes while R is being enqueued.

      In the first case (we see T0), server selection would return no result, the request would be enqueued, and the query will be satisfied after T is applied to the topology manager.

      In the second case (we see T), the query will be satisfied without enqueuing the request.

            Assignee:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Reporter:
            lamont.nelson@mongodb.com Lamont Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: