Skip to content

DOCS-7353: limited circumstances for writing to the config db #2579

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 4 commits into from
Closed
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
29 changes: 23 additions & 6 deletions source/reference/config-database.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,12 @@ The ``config`` database supports :term:`sharded cluster`
operation. See the :doc:`/sharding` section of this manual for full
documentation of sharded clusters.

.. important:: Consider the schema of the ``config`` database
.. important:: The schema of the ``config`` database is
*internal* and may change between releases of MongoDB. The
``config`` database is not a dependable API, and users should not
write data to the ``config`` database in the course of normal
operation or maintenance.

.. warning:: Modification of the ``config`` database on a functioning
system may lead to instability or inconsistent data sets. If you
must modify the ``config`` database, use :program:`mongodump` to
create a full backup of the ``config`` database.

To access the ``config`` database, connect to a :program:`mongos`
instance in a sharded cluster, and use the following helper:

Expand All @@ -42,6 +37,28 @@ You can return a list of the collections, with the following helper:

show collections

The config database is for internal use only, and during normal
operations you should never manually insert or store data in it.
However, if you need to verify the write availability of a config
server, you can insert a document into a test collection (after
making sure that no collection of that name already exists):

.. warning:: Modification of the ``config`` database on a functioning
system may lead to instability or inconsistent data sets. If you
must modify the ``config`` database, use :program:`mongodump` to
create a full backup of the ``config`` database.

.. code-block:: javascript

db.testConfigServerWriteAvail.insert( { a : 1 } )

If the operation succeeds, the config server is available to process
writes.

Future releases of the server may include different collections in
the config database, so be careful when selecting a name for your
test collection.

Collections
-----------

Expand Down