Force secondary to sync to specific server

65 views
Skip to first unread message

Colin Howe

unread,
Jul 3, 2012, 12:16:22 PM7/3/12
to mongod...@googlegroups.com
We've hit the following scenario:
  • X is the primary
  • Y is a secondary but is struggling to keep up with the oplog and is starting to have noticable replication lag
  • Z is also a secondary and has syncingTo in rs.status() set to Y... as a result Z is dropping behind too even though it is actually healthy
Is there a way to force Z to sync to X?


Thanks,
Colin


--
Website: http://www.colinhowe.co.uk
Twitter: http://twitter.com/colinhowe

Kenny Gorman

unread,
Jul 3, 2012, 12:42:30 PM7/3/12
to mongod...@googlegroups.com, Kenny Gorman
Colin,

Yes, have seen this exact problem before.

You can hack on your /etc/hosts file to redirect the secondary to read from anyone you want.  So just put a false entry in there for the server it's reading from pointing back to the primary.  I think there are tickets to deal with this in the future.

-kg

--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb

Jenna

unread,
Jul 3, 2012, 4:39:12 PM7/3/12
to mongodb-user
Hi Colin,
There is a JIRA ticket for this request: https://jira.mongodb.org/browse/SERVER-3921.
The issue has been resolved and will be available in MongoDB version
2.2, the next stable release.
Reply all
Reply to author
Forward
0 new messages