-
Type: Task
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.28.1
-
Component/s: DDL
-
None
The mongo shell example has max : 5000, which you can't specify in Compass:
db.createCollection("log", { capped : true, size : 5242880, max : 5000 } )
https://docs.mongodb.com/manual/core/capped-collections/#create-a-capped-collection
Acceptance criteria
- Must add new maximum documents field
- Must validate that maximum documents is only valid if collection size (in bytes) is also set as per documentation
- Optional - Should we warn with message "MongoDB may store fewer than N documents if size limit is reached" if size (in bytes) is less than maximum documents x 16MB (max document size)?
- Optional - Should we error with message "Size need not be larger than X" if size (in bytes) is greater than maximum documents x 16MB (max document size)?
- Optional - Given size restrictions above, should we make maximum documents the first field in the capped collection GUI and then pre-populate size based on maximum documents x 16MB if it is not already set?
NOTE: Not sure how the 16MB limit applies to GridFS collections, so this validation may be wrong in such cases, please do research and update the ticket accordingly.
Minor note: Max document size was increased from 4MB to 16MB in https://jira.mongodb.org/browse/SERVER-431