Skip to content

Commit 23ec6b3

Browse files
jason-price-mongodbjason-price-mongodb
and
jason-price-mongodb
authored
DOCS-16593-chunks-update (#5904) (#6026)
* DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update --------- Co-authored-by: jason-price-mongodb <[email protected]>
1 parent 1af59d8 commit 23ec6b3

File tree

1 file changed

+32
-22
lines changed

1 file changed

+32
-22
lines changed

source/reference/config-database.txt

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ to support sharding:
164164

165165
.. data:: config.changelog.what
166166

167-
Reflects the type of change recorded. Possible values include:
167+
The type of change recorded. Possible values include:
168168

169169
- ``dropCollection``
170170
- ``dropCollection.start``
@@ -181,38 +181,48 @@ to support sharding:
181181

182182
.. data:: config.changelog.details
183183

184-
A :term:`document` that contains additional details regarding
184+
A :term:`document` that contains additional details for
185185
the change. The structure of the :data:`~config.changelog.details`
186186
document depends on the type of change.
187187

188188
.. data:: config.chunks
189189

190190
.. include:: /includes/admonition-config-db-is-internal.rst
191191

192-
The :data:`~config.chunks` collection stores a document for each chunk in
193-
the cluster. Consider the following example of a document for a
194-
chunk named ``mydb.foo-a_\"cat\"``:
192+
The :data:`config.chunks` collection stores a document for each
193+
chunk in the cluster. The following example shows a document:
195194

196195
.. code-block:: javascript
197196

198197
{
199-
"_id" : "mydb.foo-a_\"cat\"",
200-
"lastmod" : Timestamp(2, 1),
201-
"uuid": "c025d039-e626-435e-b2d2-c1d436038041",
202-
"min" : {
203-
"animal" : "cat"
204-
},
205-
"max" : {
206-
"animal" : "dog"
207-
},
208-
"shard" : "shard0004",
209-
"history" : [ { "validAfter" : Timestamp(1569368571, 27), "shard" : "shard0004" } ]
198+
_id: ObjectId('65a954c0de11596e08e7c1dc'),
199+
uuid: UUID('a4479215-a38d-478f-a82b-e5e95d455e55'),
200+
min: { a: Long('121204345') },
201+
max: { a: Long('993849349') },
202+
shard: 'shard01',
203+
lastmod: Timestamp({ t: 1, i: 0 }),
204+
history: [
205+
{
206+
validAfter: Timestamp({ t: 1705596095, i: 14 }),
207+
shard: 'shard01'
208+
}
209+
]
210210
}
211211

212-
These documents store the range of values for the shard key that
213-
describe the chunk in the ``min`` and ``max`` fields. Additionally
214-
the ``shard`` field identifies the shard in the cluster that "owns"
215-
the chunk.
212+
In the document:
213+
214+
- ``_id`` is the chunk identifier.
215+
- ``min`` and ``max`` are the range of values for the chunk's shard
216+
key.
217+
- ``shard`` is the name of the shard that stores the chunk in the
218+
cluster.
219+
220+
.. tip::
221+
222+
To find the chunks in a collection, retrieve the collection's
223+
``uuid`` identifier from the :data:`config.collections`
224+
collection. Then, use ``uuid`` to retrieve the matching document
225+
with the same ``uuid`` from the ``config.chunks`` collection.
216226

217227
.. data:: config.collections
218228

@@ -413,7 +423,7 @@ to support sharding:
413423
.. include:: /includes/admonition-config-db-is-internal.rst
414424

415425
The :data:`~config.version` collection holds the current metadata version number. This
416-
collection contains only one document. For example:
426+
collection contains only one document. For example:
417427

418428
.. code-block:: javascript
419429

@@ -431,7 +441,7 @@ to support sharding:
431441
Collections to Support Sessions
432442
-------------------------------
433443

434-
Starting in MongoDB 3.6, the ``config`` database contains the
444+
The ``config`` database contains the
435445
*internal* collections to support :ref:`causally consistent sessions
436446
<sessions>` for standalones, replica sets, and sharded clusters and
437447
retryable writes and :ref:`transactions <transactions>` for

0 commit comments

Comments
 (0)