diff --git a/source/reference/config-database.txt b/source/reference/config-database.txt index 97250fbdf97..c6d858cca33 100644 --- a/source/reference/config-database.txt +++ b/source/reference/config-database.txt @@ -164,7 +164,7 @@ to support sharding: .. data:: config.changelog.what - Reflects the type of change recorded. Possible values include: + The type of change recorded. Possible values include: - ``dropCollection`` - ``dropCollection.start`` @@ -181,7 +181,7 @@ to support sharding: .. data:: config.changelog.details - A :term:`document` that contains additional details regarding + A :term:`document` that contains additional details for the change. The structure of the :data:`~config.changelog.details` document depends on the type of change. @@ -189,30 +189,40 @@ to support sharding: .. include:: /includes/admonition-config-db-is-internal.rst - The :data:`~config.chunks` collection stores a document for each chunk in - the cluster. Consider the following example of a document for a - chunk named ``mydb.foo-a_\"cat\"``: + The :data:`config.chunks` collection stores a document for each + chunk in the cluster. The following example shows a document: .. code-block:: javascript { - "_id" : "mydb.foo-a_\"cat\"", - "lastmod" : Timestamp(2, 1), - "uuid": "c025d039-e626-435e-b2d2-c1d436038041", - "min" : { - "animal" : "cat" - }, - "max" : { - "animal" : "dog" - }, - "shard" : "shard0004", - "history" : [ { "validAfter" : Timestamp(1569368571, 27), "shard" : "shard0004" } ] + _id: ObjectId('65a954c0de11596e08e7c1dc'), + uuid: UUID('a4479215-a38d-478f-a82b-e5e95d455e55'), + min: { a: Long('121204345') }, + max: { a: Long('993849349') }, + shard: 'shard01', + lastmod: Timestamp({ t: 1, i: 0 }), + history: [ + { + validAfter: Timestamp({ t: 1705596095, i: 14 }), + shard: 'shard01' + } + ] } - These documents store the range of values for the shard key that - describe the chunk in the ``min`` and ``max`` fields. Additionally - the ``shard`` field identifies the shard in the cluster that "owns" - the chunk. + In the document: + + - ``_id`` is the chunk identifier. + - ``min`` and ``max`` are the range of values for the chunk's shard + key. + - ``shard`` is the name of the shard that stores the chunk in the + cluster. + + .. tip:: + + To find the chunks in a collection, retrieve the collection's + ``uuid`` identifier from the :data:`config.collections` + collection. Then, use ``uuid`` to retrieve the matching document + with the same ``uuid`` from the ``config.chunks`` collection. .. data:: config.collections @@ -400,7 +410,7 @@ to support sharding: .. include:: /includes/admonition-config-db-is-internal.rst The :data:`~config.version` collection holds the current metadata version number. This - collection contains only one document. For example: + collection contains only one document. For example: .. code-block:: javascript @@ -418,7 +428,7 @@ to support sharding: Collections to Support Sessions ------------------------------- -Starting in MongoDB 3.6, the ``config`` database contains the +The ``config`` database contains the *internal* collections to support :ref:`causally consistent sessions <sessions>` for standalones, replica sets, and sharded clusters and retryable writes and :doc:`transactions </core/transactions>` for