diff options
Diffstat (limited to 'db/pdfile.cpp')
-rw-r--r-- | db/pdfile.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/db/pdfile.cpp b/db/pdfile.cpp index 80ae649..95bdb17 100644 --- a/db/pdfile.cpp +++ b/db/pdfile.cpp @@ -197,7 +197,7 @@ namespace mongo { // $nExtents is just for testing - always allocate new extents // rather than reuse existing extents so we have some predictibility // in the extent size used by our tests - database->suitableFile( (int) size )->createExtent( ns, (int) size, newCapped ); + database->suitableFile( (int) size, false )->createExtent( ns, (int) size, newCapped ); } } else { while ( size > 0 ) { @@ -206,11 +206,6 @@ namespace mongo { Extent *e = database->allocExtent( ns, desiredExtentSize, newCapped ); size -= e->length; } - if ( !newCapped ) { - // check if it's time to preallocate a new file, and if so queue that job for a bg thread - // safe to call this multiple times - the implementation will only preallocate one file - database->preallocateAFile(); - } } NamespaceDetails *d = nsdetails(ns); @@ -1537,7 +1532,9 @@ namespace mongo { assumes ns is capped and no indexes */ Record* DataFileMgr::fast_oplog_insert(NamespaceDetails *d, const char *ns, int len) { + assert( d ); RARELY assert( d == nsdetails(ns) ); + DEV assert( d == nsdetails(ns) ); DiskLoc extentLoc; int lenWHdr = len + Record::HeaderSize; |