From 7b77a1aace6d255024f1d839db395d91b76143a9 Mon Sep 17 00:00:00 2001 From: Steve Renaker Date: Mon, 28 Mar 2016 15:59:33 -0700 Subject: [PATCH 1/4] DOCS-7353: limited circumstances for writing to the config db --- source/reference/config-database.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/reference/config-database.txt b/source/reference/config-database.txt index c23e7f2546a..4f8f048fe0f 100644 --- a/source/reference/config-database.txt +++ b/source/reference/config-database.txt @@ -42,6 +42,22 @@ You can return a list of the collections, with the following helper: show collections +During normal operations, you should never manually insert or store +production data in the config database. It is for internal use only. +However, if you need to verify the write availability of a config +server, you can insert a test document into an unused collection. + +.. 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 ----------- From 6c8d9ed227fc38598dead8f8c8650feac124c73b Mon Sep 17 00:00:00 2001 From: Steve Renaker Date: Mon, 28 Mar 2016 16:13:41 -0700 Subject: [PATCH 2/4] DOCS-7353: changed wording of "Important" box --- source/reference/config-database.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/config-database.txt b/source/reference/config-database.txt index 4f8f048fe0f..ebd1e22ef85 100644 --- a/source/reference/config-database.txt +++ b/source/reference/config-database.txt @@ -18,7 +18,7 @@ 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 From 3f07f134a936598331b81ad14e46a15a40d30a78 Mon Sep 17 00:00:00 2001 From: Steve Renaker Date: Tue, 29 Mar 2016 11:30:00 -0700 Subject: [PATCH 3/4] DOCS-7353: new wording for writing to a test collection in config db --- source/reference/config-database.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/reference/config-database.txt b/source/reference/config-database.txt index ebd1e22ef85..fdcd68f0313 100644 --- a/source/reference/config-database.txt +++ b/source/reference/config-database.txt @@ -42,10 +42,11 @@ You can return a list of the collections, with the following helper: show collections -During normal operations, you should never manually insert or store -production data in the config database. It is for internal use only. +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 test document into an unused collection. +server, you can insert a document into a test collection (after +making sure that no collection of that name already exists): .. code-block:: javascript From 18ef7195c7a5e9f897783613b58ac55c733eff48 Mon Sep 17 00:00:00 2001 From: Steve Renaker Date: Tue, 29 Mar 2016 16:10:38 -0700 Subject: [PATCH 4/4] DOCS-7353: moved warning about modifying config db --- source/reference/config-database.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/reference/config-database.txt b/source/reference/config-database.txt index fdcd68f0313..ab1344d4633 100644 --- a/source/reference/config-database.txt +++ b/source/reference/config-database.txt @@ -24,11 +24,6 @@ documentation of sharded clusters. 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: @@ -48,6 +43,11 @@ 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 } )