[SERVER-83368] Support concept of replica set members having different hostnames in ReplSetTest#getURL() Created: 16/Nov/23  Updated: 22/Jan/24

Status: Open
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Backlog - Replication Team
Resolution: Unresolved Votes: 0
Labels: repl-shortlist
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Replication
Sprint: Repl 2024-01-08, Repl 2024-01-22
Participants:
Linked BF Score: 60

 Description   

The evergreen/antithesis_image_build_and_push.sh script runs a sanity check to verify a test run by resmoke against a Docker Compose spawned MongoDB cluster will succeed. For concurrency tests which use $config.passConnectionCache === true this involves using ReplSetTest to dynamically discover all of the shards and all of the replica set members within the shards.

ReplSetTest#getURL() returns a connection string based which relies on the ReplSetTest#host property. However the ReplSetTest#host property is arbitrarily assigned to be the hostname of the first node in the replica set configuration.

ReplSetTest.prototype.getURL = function() {
    var hosts = [];
 
    for (var i = 0; i < this.ports.length; i++) {
        hosts.push(this.host + ":" + this.ports[i]);
    }
 
    return this.name + "/" + hosts.join(",");
};

We should introduce a mechanism to enable FSMShardingTest to receive a connection string from a ReplSetTest object which preserves the hostnames of the individual cluster members.


Generated at Thu Feb 08 06:51:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.