diff options
author | Greg Studer <greg@10gen.com> | 2013-02-28 13:53:57 -0500 |
---|---|---|
committer | Greg Studer <greg@10gen.com> | 2013-02-28 13:54:35 -0500 |
commit | 7471ba53b04f21157c4d6066e6e2769d856a3d3c (patch) | |
tree | 5b3706cabedf84a96a11fd1c15ccd7caee9a9db4 | |
parent | cb1bdcd2688b65fce865d3db5c23c47d3b69c6be (diff) | |
download | mongo-7471ba53b04f21157c4d6066e6e2769d856a3d3c.tar.gz |
SERVER-8781 buildbot sharding_migrateBigObject better error message when balancing fails due to I/O problems
-rw-r--r-- | jstests/slowNightly/sharding_migrateBigObject.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/jstests/slowNightly/sharding_migrateBigObject.js b/jstests/slowNightly/sharding_migrateBigObject.js index b331dffb2f8..4e4f7dd9a04 100644 --- a/jstests/slowNightly/sharding_migrateBigObject.js +++ b/jstests/slowNightly/sharding_migrateBigObject.js @@ -41,7 +41,21 @@ admin.runCommand({ shardcollection : "" + coll, key : { _id : 1 } }) assert.lt( 5 , mongos.getDB( "config" ).chunks.find( { ns : "test.stuff" } ).count() , "not enough chunks" ); assert.soon( - function(){ + function(){ + + // On *extremely* slow or variable systems, we've seen migrations fail in the critical section and + // kill the server. Do an explicit check for this. SERVER-8781 + // TODO: Remove once we can better specify what systems to run what tests on. + try { + assert.eq(null, shardA.getDB("admin").getLastError()); + assert.eq(null, shardB.getDB("admin").getLastError()); + } + catch(e) { + print("An error occurred contacting a shard during balancing," + + " this may be due to slow disk I/O, aborting test."); + throw e; + } + res = mongos.getDB( "config" ).chunks.group( { cond : { ns : "test.stuff" } , key : { shard : 1 } , reduce : function( doc , out ){ out.nChunks++; } , |