mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 00:56:44 +01:00
add a couple commitIfNeeded calls to unit test. probably not important but might be helpful for 32 bit testing stability
This commit is contained in:
parent
a860959b44
commit
b7546b71c7
@ -192,7 +192,7 @@ namespace mongo {
|
||||
_bytes += b;
|
||||
#if defined(_DEBUG)
|
||||
_nSinceCommitIfNeededCall++;
|
||||
if( _nSinceCommitIfNeededCall >= 60 ) {
|
||||
if( _nSinceCommitIfNeededCall >= 80 ) {
|
||||
if( _nSinceCommitIfNeededCall % 20 == 0 )
|
||||
log() << "debug nsincecommitifneeded:" << _nSinceCommitIfNeededCall << ' ' << x << " bytes " << b << endl;
|
||||
}
|
||||
|
@ -90,8 +90,10 @@ namespace BtreeTests {
|
||||
}
|
||||
void insert( BSONObj &key ) {
|
||||
bt()->bt_insert( dl(), recordLoc(), key, Ordering::make(order()), true, id(), true );
|
||||
getDur().commitIfNeeded();
|
||||
}
|
||||
bool unindex( BSONObj &key ) {
|
||||
getDur().commitIfNeeded();
|
||||
return bt()->unindex( dl(), id(), key, recordLoc() );
|
||||
}
|
||||
static BSONObj simpleKey( char c, int n = 1 ) {
|
||||
@ -512,6 +514,7 @@ namespace BtreeTests {
|
||||
static DiskLoc make( IndexDetails &id ) {
|
||||
DiskLoc ret = addBucket( id );
|
||||
is( ret )->init();
|
||||
getDur().commitIfNeeded();
|
||||
return ret;
|
||||
}
|
||||
static ArtificialTree *is( const DiskLoc &l ) {
|
||||
|
Loading…
Reference in New Issue
Block a user