Reputation: 17876
When I tried to add a new node to current replica set, the current PRIMARY node always changed to other state (say RECOVERING )? why is this happening ?
How can I manually update the state of a replica set server/node?
Upvotes: 0
Views: 159
Reputation: 24007
Any reconfiguration of your replica set will cause a new election, and any caught-up member may be elected primary, not just your current primary. If a new primary is elected, the old primary has to pass through the RECOVERING state while it checks to see if it has all the data that the new primary has. If your set is healthy, the old primary should only spend a few seconds in RECOVERING before it becomes SECONDARY.
Upvotes: 2