Minor - P4
To manipulate this setting, start mongod with: --setParameter maxSyncSourceLagSecs=120.
It is only settable at startup, not runtime.
The default value is 30 seconds.
Original Description Below
Changed in version 2.4: The sync target falls more than 30 seconds behind another member of the replica set; then, the mongod instance will revert to the default sync logic and target.
It'd be nice to be able to tune this from 30s to other values. For some setups, having the sync target frequently change and override our syncFrom target under heavy load can have serious issues.
Take a 3 node replica set with a hidden node for example. If these nodes are geographically distributed somewhat, then I may want to read off of my visible secondary to reduce read latency. However, I require all of my reads to be consistent.
I could use tags for this, however I now lose failover in the event that I lose the visible secondary or primary because all of my tagged writes will fail. To preserve failover, I have to use w:2.
However, if my latency hits the 30sec mark then it will override the syncFrom target and the writes will go to the primary and the hidden node. I will now get stale reads off of my visible secondaries.