[COMPASS-338] Capped collection: Cannot specify max documents Created: 15/Nov/16  Updated: 03/Oct/23  Resolved: 30/Jun/22

Status: Closed
Project: Compass
Component/s: DDL
Affects Version/s: 1.28.1
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Peter Schmidt Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Also needs to be tested against Create Collection.png     PNG File UI UX - Cannot choose max documents.png    
Epic Link: COMPASS-2238
Story Points: 3

 Description   

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



 Comments   
Comment by Jessica Sigafoos [ 30/Jun/22 ]

Thank you for your feedback! If this issue is still relevant to you, please vote on or file a feature request at https://feedback.mongodb.com/

Generated at Wed Feb 07 22:24:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.