[SERVER-7937] Write more test for ReplicaSetMonitor Created: 14/Dec/12  Updated: 11/Jul/16  Resolved: 19/Feb/14

Status: Closed
Project: Core Server
Component/s: Internal Client, Testing Infrastructure
Affects Version/s: 2.3.2
Fix Version/s: 2.6.0-rc0

Type: Task Priority: Major - P3
Reporter: Randolph Tan Assignee: Tyler Brock
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-12284 ReplicaSetMonitor is broken Closed
Related
Backwards Compatibility: Fully Compatible
Participants:

 Description   

We could add more test in this description as we go along, but here's some things we should test:

  1. Test inconsistent replies for isMaster/replSetGetStatus from different nodes (simulating a condition where the config doc was not yet fully propagated to the other secondaries).
    1. Multiple nodes claim to be master. We use a last-wins policy.
    2. Nodes disagree about who is in set. We only trust replies from the master when adjusting set membership (unless no master found during scan). Make sure the final nodes list, the seeds list, and the nodes contacted during the scan are correct.
    3. Combination of the last two: Multiple nodes claim to be master and disagree about set membership.
  2. Make sure SetState::getMatchingHost returns hosts even if a scan is ongoing. This is what allows early exit from Refresher::refreshUntilMatches and allows RSM::getHost() to avoid going to the network if we know of a suitable node.
  3. Make sure nothing breaks if someone calls the out-of-band RSM::failedHost notifier during a scan.
  4. Test parsing of isMaster replies. This can directly test RSM::IsMasterReply::parse().
  5. Consider cribbing tests from other drivers if they make sense.


 Comments   
Comment by Githook User [ 18/Feb/14 ]

Author:

{u'username': u'TylerBrock', u'name': u'Tyler Brock', u'email': u'tyler.brock@gmail.com'}

Message: SERVER-7937 Additional ReplicaSetMonitor Tests

Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/640ec7cc23fa5e2f4cdc4eb1cccbd94be7b7ed88

Generated at Thu Feb 08 03:16:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.