jstests/disk/too_many_fds.js
// can still listen on fd's smaller than FD_SETSIZE.
can still listen on fd's smaller than FD_SETSIZE.
can still listen on fd ' s smaller than FD_SETSIZE .
function doTest() {
    var baseName = "jstests_disk_too_many_fds";
    var m = MongoRunner.runMongod( { smallfiles: "" , nssize: 1 } );
    for (var i = 1; i < 1026; ++i) {
        var db = m.getDB("db" + i);
        var coll = db.getCollection("coll" + i);
        assert.writeOK(coll.insert( {} ));
    }
    MongoRunner.stopMongod( m );
    var m2 = MongoRunner.runMongod( { dbpath: m.dbpath, smallfiles: "" , nssize: 1,
                                      restart: true, cleanData: false } );
    assert.eq(1, m2.getDB("db1025").getCollection("coll1025").count());
}
function doTest ( ) { var baseName = "jstests_disk_too_many_fds" ; var m = MongoRunner . runMongod ( { smallfiles : "" , nssize : 1 } ) ; for ( var i = 1 ; i < 1026 ; ++ i ) { var db = m . getDB ( "db" + i ) ; var coll = db . getCollection ( "coll" + i ) ; assert . writeOK ( coll . insert ( { } ) ) ; } MongoRunner . stopMongod ( m ) ; var m2 = MongoRunner . runMongod ( { dbpath : m . dbpath , smallfiles : "" , nssize : 1 , restart : true , cleanData : false } ) ; assert . eq ( 1 , m2 . getDB ( "db1025" ) . getCollection ( "coll1025" ) . count ( ) ) ; }
can still listen on fd's smaller than FD_SETSIZE.
can still listen on fd ' s smaller than FD_SETSIZE .
// Make 1026 collections, each in a separate database.  On some storage engines, this may cause // 1026 files to be created. // Ensure we can still start up with that many files.