[SERVER-9551] Perform a minimum size validation when creating oplog Created: 03/May/13  Updated: 06/Dec/22  Resolved: 23/Aug/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Adam Comerford Assignee: Backlog - Replication Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-11894 Inserting into a capped collection an... Closed
Assigned Teams:
Replication
Participants:

 Description   

Currently, when creating the oplog or other capped collections MongoDB allows you to create an oplog <16MB without warning or error. Hence the collection can be smaller than a single large document. Given that the collection must be dropped to correct this, we should validate the size and enforce a sane minimum (perhaps >32MB - i.e. greater than the size of two max sized BSON docs, should be disallowed and anything under 1GB should print a warning).



 Comments   
Comment by Scott Hernandez (Inactive) [ 04/Feb/15 ]

If the secondary has an oplog which is too small for the replicated oplog entries then it will fassert and shutdown.

This behavior crosses into the bug realm.

Comment by Eliot Horowitz (Inactive) [ 29/Nov/13 ]

The oplog case is not the same as a general capped collection.
If you think the capped part is important, please make that a different ticket.

Comment by Adam Comerford [ 28/Nov/13 ]

Perhaps a warning when creating the capped collection (oplog or not) if it is <16MB. Currently this can lead to some nasty side-effects

Comment by Eliot Horowitz (Inactive) [ 03/May/13 ]

many valid use cases for small oplogs, and since someone has to explicitly do it, not sure we shouldn't let them.

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