Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-355

Capped collections go over the configured limits

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 1.1.1
    • None
    • None
    • OSX 64-bit with Ruby 0.15.1 driver

    Description

      I'm creating a collection limited to 100MB of data:

            col = @db.create_collection(host, { :capped => true, :size => 100_000_000 })
            col.create_index 'invoked_at'
            col.create_index 'code'

      Then I inserted 1,000,000 documents to see what would happen.

      -rw-------  1 mike    wheel   67108864 Oct 13 14:06 web-analytics.0
      -rw-------  1 mike    wheel  134217728 Oct 13 14:10 web-analytics.1
      -rw-------  1 mike    wheel  268435456 Oct 13 14:06 web-analytics.2
      -rw-------  1 mike    wheel  536870912 Oct 13 14:06 web-analytics.3
      -rw-------  1 mike    wheel   16777216 Oct 13 14:01 web-analytics.ns

      Here's a listing of the collections and their document count within the web-analytics database:

      system.indexes: 2
      www.mikeperham.com: 735293

      I was under the impression the million limit should mean bytes, not documents, so why is the entire database taking 800+MB on disk?

      Attachments

        Activity

          People

            eliot Eliot Horowitz (Inactive)
            mperham Mike Perham
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: