Skip to content

Commit bf5e68a

Browse files
author
Sam Kleinman
committed
DOCS-362 capped collections _id behavior change for 2.2
1 parent de55b0d commit bf5e68a

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

source/core/indexes.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ _id
6868

6969
The ``_id`` index is a :ref:`unique index <index-type-unique>`
7070
[#unique-index-report]_ on the ``_id`` field, and MongoDB creates this
71-
index by default on all collections, except for capped collections. [#capped-collections]_
71+
index by default on all collections. [#capped-collections]_
7272
You cannot delete the index on ``_id``.
7373

7474
The ``_id`` field is the :term:`primary key` for the collection, and
@@ -90,12 +90,11 @@ is a 12-byte unique identifiers suitable for use as the value of an
9090
the :func:`getIndexes() <db.collection.getIndexes()>` method will
9191
*not* print ``unique: true`` in the :program:`mongo` shell.
9292

93-
.. [#capped-collections] Capped collections are special collections
94-
that do not have an ``_id`` index by default. If you specify
95-
``autoIndexId: true`` when creating a capped collection MongoDB will
96-
create an ``_id`` index on this collection. Replica set members may
97-
create ``_id`` indexes on capped collections during the replication
98-
process.
93+
.. [#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 information.
9998

10099
.. TODO fix the above when a full capped-collection page exists.
101100

source/release-notes/2.2.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,8 @@ Additional Improvements
382382
use and state. In previous versions, these data were sampled. See
383383
:issue:`SERVER-5784` and :status:`indexCounters` for more information.
384384

385+
.. _2.2-id-indexes-capped-collections:
386+
385387
``_id`` Indexes on Capped Collections
386388
`````````````````````````````````````
387389

0 commit comments

Comments
 (0)