[SERVER-50469] ReplSetTest initiated with seed member throws error on shutdown Created: 21/Aug/20  Updated: 27/Oct/23  Resolved: 21/Aug/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: A. Jesse Jiryu Davis Assignee: Backlog - Replication Team
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Operating System: ALL
Participants:

 Description   

In theory, we can create a ReplSetTest fixture from a seed node that is part of an existing replica set, like 'new ReplSetTest("host:123")'. The test queries the RS config and initiates its own data structures as if it had initiated the set itself. However, ReplSetTest.stop() fails:

checkDBHashesForReplSet going to check data hashes on secondary: jesse-workstation:20022
uncaught exception: TypeError: replSetConfig.members[rst.getNodeId(...)] is undefined :
checkDBHashesForReplSet/<@src/mongo/shell/replsettest.js:2510:47
checkDBHashesForReplSet@src/mongo/shell/replsettest.js:2387:17
ReplSetTest/this.checkReplicaSet@src/mongo/shell/replsettest.js:2303:13
ReplSetTest/this.checkReplicatedDataHashes@src/mongo/shell/replsettest.js:2588:9
RollbackTest/this._checkDataConsistencyImpl@jstests/replsets/libs/rollback_test.js:249:9
RollbackTest/this.checkDataConsistency@jstests/replsets/libs/rollback_test.js:255:9

The fixture doesn't initialize its "members" array when constructed with a seed node.



 Comments   
Comment by A. Jesse Jiryu Davis [ 21/Aug/20 ]

False alarm, I was confused by some other symptoms that made me think this was a bug.

Generated at Thu Feb 08 05:22:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.