Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-6664

Initial sync source is much harder to set than docs suggest

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Server
    • Labels:
      None
    • # Replies:
      0
    • Last comment by Customer:
      true

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kay.kim Kay Kim
                Reporter:
                andrew.ryder Andrew Ryder
                Participants:
                Last commenter:
                Jonathan Dahl
              • Votes:
                2 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Days since reply:
                  3 years, 25 weeks, 4 days ago