[DOCS-6664] Initial sync source is much harder to set than docs suggest Created: 27/Nov/15  Updated: 30/Oct/23  Resolved: 01/Nov/22

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Major - P3
Reporter: Andrew Ryder (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Won't Fix Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-7680 Have replSetSyncFrom restart initialS... Closed
Participants:
Days since reply: 1 year, 14 weeks, 1 day ago
Epic Link: DOCSP-1769

 Description   

RE: https://docs.mongodb.org/manual/tutorial/configure-replica-set-secondary-sync-target/#sync-logic

To affect the sync target for the initial sync, run rs.syncFrom() operation before initial sync.

It's that word "before" which isn't really possible. The only way to call rs.syncFrom() is if you have a shell to the affected member. If you have a shell to the affected member then it is contactable by all others members, and is also probably itself hunting for a sync target already. I.E the human must race the machine to change sync targets. That isn't a winnable race.

SERVER-7680 suggests issuing the rs.syncFrom() as normal and then killing the current operations related to initial sync (presumably using db.currentOp()). Which will cause the hunt to recognize the new setting and re-acquire to the desired target.

However, all this only works if you don't have auth enabled because, if you do, the credentials haven't been replicated yet (or you log in as __system).

Alternatively, use iptables or other firewall-type arrangements to force the target to have no choice.

I don't know the best answer in this case, but certainly right now it is not as simple as the docs suggest.



 Comments   
Comment by Education Bot [ 01/Nov/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

Generated at Thu Feb 08 07:52:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.