Reputation: 6144
In a MongoDB replica set, we can force a certain delay on secondary nodes. What I'm unable to understand is that even though these nodes (delayed ones) participate in Election, can they ever become Primary ? If they can, then what happens to their delayed preference, does it warn off automatically ?
Upvotes: 1
Views: 287
Reputation: 2884
They can become primary, so they should have a priority of 0 and be set as hidden to prevent them from becoming primary.
Delayed members must have a priority set to 0 to prevent them from becoming primary in their replica sets. Also these members should be hidden to prevent your application from seeing or querying this member.
source: Delayed Members.
You can find more details about election internals at this link.
Upvotes: 2