[SERVER-30683] Add support failovers in resmoke.py's ReplicaSetFixture Created: 16/Aug/17  Updated: 30/Oct/23  Resolved: 01/Sep/17

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

Type: New Feature Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Yves Duhem
Resolution: Fixed Votes: 0
Labels: sharding36-passthrough-testing, tig-resmoke
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-31194 Add a version of retryable_writes_jsc... Closed
Duplicate
is duplicated by SERVER-21718 Add option to resmoke.py to allow ste... Closed
Backwards Compatibility: Fully Compatible
Sprint: TIG 2017-09-11
Participants:

 Description   

The ReplicaSetFixture in resmoke.py configures the replica set such that the first node is always the primary by making all other nodes have a priority of zero. In order to meaningfully support failovers, the ReplicaSetFixture class should be changed to have an option where all nodes are electable.

  • An all_nodes_electable parameter should be added to the ReplicaSetFixture constructor. The parameter should default to false in order to avoid needing to change any existing usages of the ReplicaSetFixture class by other test suites.
  • Change JSTestCase#configure() and JSONSchemaTestCase#configure() to use a MongoDB connection URI rather than using the ReplicaSetFixture#port attribute and the --port option to the mongo shell. Note: This behavior may be implemented under SERVER-19541.
  • Update ReplicaSetFixture#get_primary() to take an optional timeout parameter. The implementation should be changed to do a round of "isMaster" requests and wait until a primary becomes available or the specified period has expired. A ServerFailure exception should be raised if none of the nodes report being the primary.
  • Update ReplicaSetFixture#setup() to explicitly use ReplicaSetFixture#nodes[0] since the first node is initiated in a replica set by itself so the other nodes are able to transition to the SECONDARY state more quickly.


 Comments   
Comment by Githook User [ 01/Sep/17 ]

Author:

{'username': 'syev', 'name': 'Yves Duhem', 'email': 'yves.duhem@mongodb.com'}

Message: SERVER-30683 Support failovers in ReplicaSetFixture
Branch: master
https://github.com/mongodb/mongo/commit/2f6a2294feb20a9a3a11dcdbfbfed05f4756c1b2

Generated at Thu Feb 08 04:24:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.