Skip to content

Commit 5e0e56e

Browse files
author
Sam Kleinman
committed
DOCS-362 correcting capped collections _id index
1 parent bb60e12 commit 5e0e56e

File tree

2 files changed

+10
-25
lines changed

2 files changed

+10
-25
lines changed

source/core/indexes.txt

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,10 @@ is a 12-byte unique identifiers suitable for use as the value of an
9191
*not* print ``unique: true`` in the :program:`mongo` shell.
9292

9393
.. [#capped-collections] Before version 2.2 capped collections did not
94-
have an ``_id`` field by default. In 2.2, all capped collections
95-
have an ``_id`` field, except those in the ``local``
96-
:term:`database`. See the :ref:`release notes
97-
<2.2-id-indexes-capped-collections>` for more
98-
information.
99-
100-
Additionally, MongoDB does not create indexes on capped collections
101-
by default do not have an index on the ``_id`` field. In the
102-
course of replicating a capped collection, :term:`secondary`
103-
members of the set will create an ``_id`` index. If you specify
104-
``autoIndexId: true`` when creating a capped collection MongoDB
105-
will create an ``_id`` index on this collection.
94+
have an ``_id`` field. In 2.2, all capped collections
95+
have an ``_id`` field, except those in the ``local`` :term:`database`.
96+
See the :ref:`release notes <2.2-id-indexes-capped-collections>`
97+
for more information.
10698

10799
.. TODO fix the above when a full capped-collection page exists.
108100

source/release-notes/2.2.txt

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -384,21 +384,14 @@ use and state. In previous versions, these data were sampled. See
384384

385385
.. _2.2-id-indexes-capped-collections:
386386

387-
``_id`` Indexes on Capped Collections
388-
`````````````````````````````````````
387+
``_id`` Fields and Indexes on Capped Collections
388+
````````````````````````````````````````````````
389389

390390
All :term:`capped collections <capped collection>` now have an ``_id``
391-
field by default if they exist outside of the ``local`` database. This
392-
change only affects capped collections created with 2.2 instances and
393-
does not impact existing capped collections.
394-
395-
Additionally in :term:`replica sets <replica set>`, :term:`secondaries
396-
<secondary>` will create indexes on the ``_id`` field for capped
397-
collections.
398-
399-
By requiring an ``_id`` field, and creating ``_id`` indexes on
400-
secondaries, MongoDB prevents situations where the absence of an
401-
``_id`` field can cause problems for replication.
391+
field by default *if* they exist outside of the ``local`` database,
392+
and indexes on the ``_id`` field. This change only affects capped
393+
collections created with 2.2 instances and does not impact existing
394+
capped collections.
402395

403396
See: :issue:`SERVER-5516` for more information.
404397

0 commit comments

Comments
 (0)