Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1421

Topology.open does not always ensure Server monitor threads are open

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6
    • Affects Version/s: None
    • Component/s: Internal
    • None

      Topology.close() closes all Servers but Topology._ensure_opened() only re-opens Servers if the Topology is already open. It takes two calls to Topology._ensure_opened() to actually re-open each Server.

      Topology._ensure_opened() should always re-start the monitor thread for each server. This issue is causing test_replica_set_reconfig.TestSecondaryAdded.test_client to fail with:

       FAILURE: Didn't ever reconnect to both secondaries (AssertionError)
       Traceback (most recent call last):
         File "/data/mci/4aeb438114e1a8e42f509d2e3edab21a/src/test/test_replica_set_reconfig.py", line 160, in test_client
           'reconnect to both secondaries')
         File "/data/mci/4aeb438114e1a8e42f509d2e3edab21a/src/test/utils.py", line 309, in wait_until
           raise AssertionError("Didn't ever %s" % success_description)
       AssertionError: Didn't ever reconnect to both secondaries

            shane.harvey@mongodb.com Shane Harvey
            shane.harvey@mongodb.com Shane Harvey
            0 Vote for this issue
            1 Start watching this issue