(Replication mode)
Scenario 1 : If the main-primary were to go down in replication mode.
Switching Main and Secondary Primary Servers
...
Connect to MongoDB on the master server in this case the (second-primary):
Code Block mongosh --username opUserRW --password op42flow42 admin
Update member priorities:
Code Block cfg = rs.conf() cfg.members[0].priority = 0.6 cfg.members[1].priority = 0.5 rs.reconfig(cfg)