[SERVER-25438] Make isMaster return no hosts when node state is REMOVED Created: 04/Aug/16  Updated: 01/Sep/20  Resolved: 01/Sep/20

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

Type: Improvement Priority: Major - P3
Reporter: Dinesh Chander Assignee: Huayu Ouyang
Resolution: Duplicate Votes: 0
Labels: former-quick-wins, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
backported by SERVER-40156 Initial implementation of Split Horizon Closed
Related
Sprint: Repl 2020-09-07
Participants:
Case:

 Description   

After restoring a replicaset, if clients connect to the replicaset before the replicaset configuration is updated, the client can connect to the databases on present in the environment from where the replicaset is restored.

Detailed scenario:
Let's assume we restore our "Test" replicaset to a "Dev" replicaset. The restore process does the following:

  1. Shuts down all mongod servers in "Dev"
  2. Wipes out all the files present in the dbpath and replaces them with the files from "Test".
  3. Restarts mongod on "Dev".
  4. Forces a rs.reconfig().

If a client connects to the "Dev" replicaset between the last two steps i.e. before the replicaset config is updated, it is allowed to connect to the databases present in the "Test" replicaset (as that's the replicaset config after the restore).

Since none of the mongod servers in the replicaset config are members of the configuration they are publishing (before the reconfig), it would be good if:

  1. The client does not accept that update
  2. Or the server doesn't publish that update

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