Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions source/core/read-preference.txt
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,8 @@ using non-:readmode:`primary` read preference modes:
direct connection to a :ref:`hidden member
<replica-set-hidden-members>` 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
Expand Down
4 changes: 3 additions & 1 deletion source/core/replica-set-architectures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 <replica-set-secondary-only-members>`,
and :ref:`Hidden Nodes <replica-set-hidden-members>`.
and :ref:`Hidden Members <replica-set-hidden-members>`.

.. _replica-set-arbiter-nodes:

Expand Down
2 changes: 2 additions & 0 deletions source/core/replication-internals.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
10 changes: 10 additions & 0 deletions source/includes/fact-replica-set-sync-prefers-non-hidden.rst
Original file line number Diff line number Diff line change
@@ -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`
2 changes: 2 additions & 0 deletions source/tutorial/configure-a-hidden-replica-set-member.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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``.

Expand Down