Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

(Replication mode)

Scenario 1 : If the main-primary were to go down in replication mode.

Switching Main and Secondary Primary Servers

...

  1. Connect to MongoDB on the master server in this case the (second-primary):

    Code Block
    mongosh --username opUserRW --password op42flow42 admin
  2. Update member priorities:

    Code Block
    cfg = rs.conf()
    cfg.members[0].priority = 0.6
    cfg.members[1].priority = 0.5
    rs.reconfig(cfg)