mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
MINOR always allocate new extents when 'nExtents' debug parameter is specified, to avoid occasional capped2.js failures
This commit is contained in:
parent
8833b6dc37
commit
df1c01d6fe
@ -134,7 +134,10 @@ namespace mongo {
|
||||
assert( size <= 0x7fffffff );
|
||||
for ( int i = 0; i < nExtents; ++i ) {
|
||||
assert( size <= 0x7fffffff );
|
||||
database->allocExtent( ns, (int) size, newCapped );
|
||||
// $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( size )->createExtent( ns, (int) size, newCapped );
|
||||
}
|
||||
} else {
|
||||
while ( size > 0 ) {
|
||||
|
@ -17,7 +17,12 @@ function checkIncreasing( i ) {
|
||||
assert( res.hasNext(), "A" );
|
||||
var j = i;
|
||||
while( res.hasNext() ) {
|
||||
try {
|
||||
assert.eq( val[ j-- ].a, res.next().a, "B" );
|
||||
} catch( e ) {
|
||||
debug( "capped2 err " + j );
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
res = tzz.find().sort( { $natural: 1 } );
|
||||
assert( res.hasNext(), "C" );
|
||||
|
Loading…
Reference in New Issue
Block a user