Provides a wrapper around the
replSetSyncFrom, which allows administrators to temporarily override the default sync target for the current member. Specify the name of the member you want to replicate from in the form of
Only modify the default sync logic as needed, and always exercise caution.
The member to sync from must be a valid source for data in the set. To sync from a member, the member must:
Have data. It cannot be an arbiter, in startup or recovering mode, and must be able to answer data queries.
Be a member of the same set in the replica set configuration.
Build indexes with the
A different member of the set, to prevent syncing from itself.
If you attempt to replicate from a member that is more than 10 seconds
behind the current member,
mongod will log a warning but will
still replicate from the lagging member. See also
Replication Lag and Flow Control.