Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-25438

Make isMaster return no hosts when node state is REMOVED

    • Repl 2020-09-07

      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

            Assignee:
            huayu.ouyang@mongodb.com Huayu Ouyang
            Reporter:
            dinesh.chander@mongodb.com Dinesh Chander
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: