[DOCS-3288] Documents in Capped Collections should not be modified Created: 28/Apr/14  Updated: 16/Mar/15  Due: 28/May/14  Resolved: 18/Jun/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: mongodb-2.6
Fix Version/s: v1.3.7

Type: Improvement Priority: Major - P3
Reporter: Andrew Ryder (Inactive) Assignee: Tim Slavin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-6984 Initial sync can fail, or break futur... Closed
Related
Participants:
Days since reply: 9 years, 35 weeks ago

 Description   

http://docs.mongodb.org/manual/core/capped-collections/#recommendations-and-restrictions


You can update documents in a collection after inserting them. However, these updates cannot cause the documents to grow. If the update operation causes the document to grow beyond their original size, the update operation will fail.

See SERVER-6984

If a document in a capped collection is updated to be smaller, and then a secondary is re-sync'ed from it, the secondary will replicate (and allocate) based on the current smaller size. If the primary then receives an update which grows the document back to the original size (perfectly safe according to the above quote), the primary will accept the update, but the secondary will die with a fatal assertion.

A document in a capped collection which was shrunk from it's original size is a landmine.

We should give a warning about this problem. See SERVER-6984 and Thomas' nifty flowchart for details on how it occurs.



 Comments   
Comment by Githook User [ 18/Jun/14 ]

Author:

{u'username': u'TimSlavinMongoDB', u'name': u'Tim Slavin (MongoDB)', u'email': u'tim.slavin@10gen.com'}

Message: DOCS-3288: capped ns error

Signed-off-by: Sam Kleinman <samk@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/969c8c37b09f2c3a63340d521eb11e03c1c7f615

Comment by Asya Kamsky [ 28/Apr/14 ]

Why don't we just say "You can only make in-place updates" instead of "You can update documents in a collection after inserting them."

Generated at Thu Feb 08 07:45:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.