[DOCS-362] New replication behavior for capped collections needs to be documented. Created: 24/Jul/12 Updated: 08/Sep/12 Resolved: 07/Aug/12 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | mongodb-2.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kevin Matulef | Assignee: | Sam Kleinman (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Participants: | |||||
| Days since reply: | 11 years, 28 weeks ago | ||||
| Description |
|
The replication behavior of capped collections has changed. By default, capped collections do not have an _id index. Prior to 2.2, this caused replication of capped collections to be very slow, until the user created the _id index themselves. In 2.2, the _id index is still not created by default on the primary, but it is created on the secondaries after some number of insert or updates. This prevents replication from falling behind. We still recommend that users create the _id index manually on the primary, so that if the primary node fails over and becomes a secondary, it will already have an _id index. |
| Comments |
| Comment by auto [ 08/Aug/12 ] |
|
Author: {u'date': u'2012-08-08T06:08:39-07:00', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}Message: |
| Comment by Kevin Matulef [ 08/Aug/12 ] |
|
Sam, sorry I didn't clarify this earlier: when we changed the capped collection defaults, we also reverted the previous change that built indexes on the secondaries. It's no longer the case that the _id index will be built on the secondary and not the primary. The set of indexes should be the same on both. Basically, for any capped collections that you've created prior to 2.2, nothing has changed. Replication will still be slow for them, until you manually create the _id index (it's recommended to do this on secondaries first, then the primary). For any capped collection that you create after 2.2 (except those in the "local" database), they'll have the _id index by default, and replication will work fine for them. |
| Comment by auto [ 07/Aug/12 ] |
|
Author: {u'date': u'2012-08-07T16:09:45-07:00', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}Message: |
| Comment by auto [ 07/Aug/12 ] |
|
Author: {u'date': u'2012-08-07T15:51:44-07:00', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}Message: |