[SERVER-19535] Capped collections grow unbounded under WiredTiger Created: 23/Jul/15  Updated: 19/Sep/15  Resolved: 23/Aug/15

Status: Closed
Project: Core Server
Component/s: WiredTiger
Affects Version/s: 3.1.6
Fix Version/s: 3.1.7

Type: Bug Priority: Critical - P2
Reporter: Bruce Lucas (Inactive) Assignee: Martin Bligh
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File capped-unbounded.png    
Issue Links:
Related
related to SERVER-19759 add a configure check for std::timed_... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   
  • 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)
    }
}



 Comments   
Comment by Githook User [ 06/Aug/15 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-19535 Fix lint
Branch: master
https://github.com/mongodb/mongo/commit/5c9f5cd52b29d29c6ae46202f98e5d353a39607a

Comment by Bruce Lucas (Inactive) [ 06/Aug/15 ]

Verified that my test as expected still repros the issue in 3.1.6, but it is fixed in this build:

2015-08-06T15:32:11.511-0400 I CONTROL [initandlisten] db version v3.1.7-pre-
2015-08-06T15:32:11.511-0400 I CONTROL [initandlisten] git version: 3ac6afd27ae0beda8da6f999bf6867e474af3ce2

Comment by Githook User [ 05/Aug/15 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-19535 Use boost timed_mutex when try_lock_for is required

The std::timed_mutex::try_lock_for method is broken until GCC 4.9. See
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54562 for more details.
Branch: master
https://github.com/mongodb/mongo/commit/a923a8a6a92127cd4ba9822d8219b1a33cb1326d

Comment by Bruce Lucas (Inactive) [ 23/Jul/15 ]

3.1.5 does not have this issue, so it's a regression in 3.1.6.

Generated at Thu Feb 08 03:51:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.