Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-338

Capped collection: Cannot specify max documents

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 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

        1. Also needs to be tested against Create Collection.png
          92 kB
          Peter Schmidt
        2. UI UX - Cannot choose max documents.png
          98 kB
          Peter Schmidt

            Assignee:
            Unassigned Unassigned
            Reporter:
            peter.schmidt Peter Schmidt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: