[SERVER-12901] Make reset threshold to fall behind sync target tunable. Created: 25/Feb/14  Updated: 11/Jul/16  Resolved: 05/Mar/14

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.6.0-rc0
Fix Version/s: 2.6.0-rc1

Type: Bug Priority: Minor - P4
Reporter: Osmar Olivo Assignee: Daniel Pasette (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Operating System: ALL
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 15/Mar/14 ]

Author:

{u'name': u'Dan Pasette', u'email': u'dan@10mongodb.com'}

Message: SERVER-12901 make test pause maxSyncSourceLagSecs
Branch: v2.6
https://github.com/mongodb/mongo/commit/78f486cdc7cf46f948030138ce1c741988a5f842

Comment by Githook User [ 15/Mar/14 ]

Author:

{u'name': u'Dan Pasette', u'email': u'dan@10mongodb.com'}

Message: SERVER-12901 make test pause maxSyncSourceLagSecs
Branch: master
https://github.com/mongodb/mongo/commit/63583514f11f910c132e91dadbdc18a9f37adade

Comment by Githook User [ 07/Mar/14 ]

Author:

{u'name': u'Dan Pasette', u'email': u'dan@10mongodb.com'}

Message: SERVER-12901 fix flapping test
Branch: master
https://github.com/mongodb/mongo/commit/0e63bed927440d1531e0a2e26cf5cb79d6b52138

Comment by Christopher Price [ 05/Mar/14 ]

I. Love. This. Story. Thank you.

Comment by Githook User [ 05/Mar/14 ]

Author:

{u'username': u'monkey101', u'name': u'Dan Pasette', u'email': u'dan@10gen.com'}

Message: SERVER-12901 make maxSyncSourceLagSecs configurable
Branch: master
https://github.com/mongodb/mongo/commit/a2ebcca174d9df0c1454119057911ef7eddfd0ec

Generated at Thu Feb 08 03:29:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.