Skip to content

DOCS-1323 replica set names must be unique #1299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
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/replica-set-architectures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ three-member replica set. These sets provide redundancy and fault
tolerance. Avoid complexity when possible, but let your application
requirements dictate the architecture.

.. include:: /includes/important-unique-replica-set-names.rst

Strategies
----------

Expand Down
7 changes: 7 additions & 0 deletions source/includes/important-unique-replica-set-names.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. important::

Connecting from the same application to more than one replica set
requires that each replica set have a distinct name. Connecting to
more than one replica set with the same name may cause problems.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "may cause problems" is a bit too hand wave-y. I'm not sure what would be better. Going to merge and we can think about it...

MongoDB suggests never creating more than one replica set with the
same name.
8 changes: 6 additions & 2 deletions source/reference/program/mongod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -524,14 +524,18 @@ Core Options

.. see SERVER-6667a

.. _cli-mongod-replica-set:

Replication Options
~~~~~~~~~~~~~~~~~~~

.. option:: --replSet <setname>

Use this option to configure replication with replica sets. Specify
a setname as an argument to this set. All hosts must have the same
set name.
a replica set name as an argument to this set. All hosts in the
replica set must have the same set name.

.. include:: /includes/important-unique-replica-set-names.rst

.. seealso:: :doc:`/replication`,
:doc:`/administration/replica-sets`, and
Expand Down
2 changes: 2 additions & 0 deletions source/tutorial/convert-standalone-to-replica-set.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Procedure

mongod --port 27017 --dbpath /srv/mongodb/db0 --replSet rs0

.. include:: /includes/important-unique-replica-set-names.rst

For more information on configuration options, see
:doc:`/reference/configuration-options` and the :program:`mongod`
manual page.
Expand Down
2 changes: 2 additions & 0 deletions source/tutorial/deploy-replica-set-for-testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Procedure

The examples in this procedure create a new replica set named ``rs0``.

.. include:: /includes/important-unique-replica-set-names.rst

You will begin by starting three :program:`mongod` instances as
members of a replica set named ``rs0``.

Expand Down
13 changes: 9 additions & 4 deletions source/tutorial/deploy-replica-set.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,20 @@ To deploy a production replica set:
.. begin-deployment-content

1. Start a :program:`mongod` instance on each system that will be part
of your replica set by issuing a
command similar to following:
of your replica set. Specify the same replica set name on each
instance. For additional :program:`mongod` configuration options
specific to replica sets, see :ref:`cli-mongod-replica-set`.

.. include:: /includes/important-unique-replica-set-names.rst

If you use a configuration file, then start each :program:`mongod`
instance with a command similar to following, where ``mongodb.conf``
is the configuration file:

.. code-block:: sh

mongod --config /etc/mongodb.conf

Where ``mongodb.conf`` is the configuration file discussed above.

.. note::

You will likely want to use and configure a
Expand Down