0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-13951 ROLLBACK_ENABLED=1

This commit is contained in:
Mathias Stearn 2014-07-30 17:34:46 -04:00
parent 815a90e216
commit f24551951e
2 changed files with 10 additions and 2 deletions

View File

@ -48,13 +48,21 @@ function checkDecreasing( i ) {
for( i = 0 ;; ++i ) {
debug( "capped 2: " + i );
tzz.insert( val[ i ] );
if ( tzz.count() == 0 ) {
var err = db.getLastError();
if ( err ) {
debug(err);
debug(tzz.count());
assert( i > 100, "K" );
break;
}
checkIncreasing( i );
}
// drop and recreate. Test used to rely on the last insert emptying the collection, which it no
// longer does now that we rollback on failed inserts.
tzz.drop();
db._dbCommand( { create: "capped2", capped: true, size: 1000, $nExtents: 11, autoIndexId: false } );
for( i = 600 ; i >= 0 ; --i ) {
debug( "capped 2: " + i );
tzz.insert( val[ i ] );

View File

@ -39,7 +39,7 @@
#include "mongo/util/log.h"
// Remove once we are ready to enable
#define ROLLBACK_ENABLED 0
#define ROLLBACK_ENABLED 1
namespace mongo {