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

Make get_internal_connection_string() for ShardedClusterFixture in replica set endpoint mode not prone to returning the wrong connection string when there are changes to the call sites

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Cluster Scalability

    Description

      Per the current design, replica set endpoint would only become active after the replica set has become a config shard (i.e. after the addShard or transitionFromConfigServer step) so before the ShardedClusterFixture has been set up, we must connect to a mongos or the router port of a mongod to run sharding commands, i.e. use the sharded connection string instead of the replica set connection string. For this reason, SERVER-84332 made get_internal_connection_string() check the new is_ready boolean (set to true at the end of await_ready() and set to false at the end of _do_teardown()) to determine which connection string should be returned.

      Currently, there is no caching of connection string (i.e. get_internal_connection_string() is called per-test through this _make_process() call before running a test through this _execute() call) so the code introduced by SERVER-84332 works just fine. But if one day we switch to only getting the connection string once at the start of the suite, then the logic here would cause the suite to use the sharded connection string instead of the replica set connection string when we intend to test the replica set endpoint.

      Attachments

        Activity

          People

            backlog-server-cluster-scalability Backlog - Cluster Scalability
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: