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

Capped collections grow unbounded under WiredTiger

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 3.1.7
    • Affects Version/s: 3.1.6
    • Component/s: WiredTiger
    • None
    • Fully Compatible
    • ALL

      • 20 GB capped collection, 4 KB documents, 24 threads doing inserts
      • 12 core / 24-cpu machine, 64 GB memory, SSD
      • growth (as measured by db.c.stats().size) slows when cap is reached, but does not show any sign of reaching a limit

      function create() {
          db.c.drop()
          db.createCollection('c', {capped:true, size:20*1024*1024*1024})
      }
      
      function insert() {
      
          x = ''
          for (var i=0; i<4000; i++)
              x += 'x'
      
          every = 10000
          for (var i=0; ; ) {
              var bulk = db.c.initializeUnorderedBulkOp();
              for (var j=0; j<every; j++, i++)
                  bulk.insert({x:x});
              bulk.execute();
              //print(i)
          }
      }
      

            Assignee:
            martin.bligh Martin Bligh
            Reporter:
            bruce.lucas@mongodb.com Bruce Lucas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: