From db7b5ae7060b3e7cae8217f032057fe9bce056ac Mon Sep 17 00:00:00 2001 From: Bob Grabar Date: Fri, 26 Apr 2013 17:22:35 -0400 Subject: [PATCH] DOCS-972 sync from hidden members --- source/core/read-preference.txt | 2 ++ source/core/replica-set-architectures.txt | 4 +++- source/core/replication-internals.txt | 2 ++ .../fact-replica-set-sync-prefers-non-hidden.rst | 10 ++++++++++ .../tutorial/configure-a-hidden-replica-set-member.txt | 2 ++ 5 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 source/includes/fact-replica-set-sync-prefers-non-hidden.rst diff --git a/source/core/read-preference.txt b/source/core/read-preference.txt index a3ce8b724e1..ab3aae8917a 100644 --- a/source/core/read-preference.txt +++ b/source/core/read-preference.txt @@ -525,6 +525,8 @@ using non-:readmode:`primary` read preference modes: direct connection to a :ref:`hidden member ` of the set. + .. include:: /includes/fact-replica-set-sync-prefers-non-hidden.rst + - Providing local reads for geographically distributed applications. If you have application servers in multiple data centers, you may diff --git a/source/core/replica-set-architectures.txt b/source/core/replica-set-architectures.txt index 770a601c0cb..1ec50a7ffe2 100644 --- a/source/core/replica-set-architectures.txt +++ b/source/core/replica-set-architectures.txt @@ -141,6 +141,8 @@ more of the following categories: from such outputs prevents clients and drivers from using hidden members for secondary reads. (See: :ref:`replica-set-hidden-members`.) + .. include:: /includes/fact-replica-set-sync-prefers-non-hidden.rst + - **Voting**: This changes the number of votes that a member of the replica set has in elections. In general, use priority to control the outcome of elections, as weighting votes introduces operational @@ -242,7 +244,7 @@ primary *and* a quorum of voting members in the main facility. these members, so that they won't vote in elections. .. seealso:: :ref:`Secondary Only `, - and :ref:`Hidden Nodes `. + and :ref:`Hidden Members `. .. _replica-set-arbiter-nodes: diff --git a/source/core/replication-internals.txt b/source/core/replication-internals.txt index 52f8a51cd07..6df7b1dd435 100644 --- a/source/core/replication-internals.txt +++ b/source/core/replication-internals.txt @@ -257,6 +257,8 @@ entries from other members. Members sync data at two different points: - *Replication* occurs continually after initial sync and keeps the member updated with changes to the replica set's data. + .. include:: /includes/fact-replica-set-sync-prefers-non-hidden.rst + In MongoDB 2.0, secondaries only change sync targets if the connection to the sync target drops [#connection-drop]_ or produces an error. diff --git a/source/includes/fact-replica-set-sync-prefers-non-hidden.rst b/source/includes/fact-replica-set-sync-prefers-non-hidden.rst new file mode 100644 index 00000000000..1e9cbc0fa3d --- /dev/null +++ b/source/includes/fact-replica-set-sync-prefers-non-hidden.rst @@ -0,0 +1,10 @@ +If :data:`~local.system.replset.settings.chainingAllowed` is enabled, +allowing secondary members to sync from other secondaries, MongoDB will +by default choose non-hidden members over hidden members and will only +choose hidden members as a last resort. In cases where you want a +secondary to sync from a hidden member first, use the +:dbcommand:`replSetSyncFrom` database command. The command has several +caveats. Refer to the documentation for :dbcommand:`replSetSyncFrom` +before using the command. + +.. seealso:: :doc:`/tutorial/manage-chained-replication` diff --git a/source/tutorial/configure-a-hidden-replica-set-member.txt b/source/tutorial/configure-a-hidden-replica-set-member.txt index 988b7450220..109343d58eb 100644 --- a/source/tutorial/configure-a-hidden-replica-set-member.txt +++ b/source/tutorial/configure-a-hidden-replica-set-member.txt @@ -14,6 +14,8 @@ from normal traffic. Typically, hidden members provide reporting, dedicated backups, and dedicated read-only testing and integration support. +.. include:: /includes/fact-replica-set-sync-prefers-non-hidden.rst + Hidden members have :data:`~local.system.replset.members[n].priority` set ``0`` and have :data:`~local.system.replset.members[n].hidden` set to ``true``.