diff options
author | Alberto Lerner <alerner@10gen.com> | 2010-12-19 17:55:02 -0500 |
---|---|---|
committer | Alberto Lerner <alerner@10gen.com> | 2010-12-19 17:55:36 -0500 |
commit | 6c3aac4b9a32a786886bf2e4da0c079bbafa3054 (patch) | |
tree | 6240772a5125849ecc7537553ed81a1c13650fda /s/d_migrate.cpp | |
parent | bf56f218e8c0cfcd5b9929831f42855f6078cbcc (diff) | |
download | mongo-6c3aac4b9a32a786886bf2e4da0c079bbafa3054.tar.gz |
better logging messages
Diffstat (limited to 's/d_migrate.cpp')
-rw-r--r-- | s/d_migrate.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/s/d_migrate.cpp b/s/d_migrate.cpp index ffb0767bcc4..e3715a4c8df 100644 --- a/s/d_migrate.cpp +++ b/s/d_migrate.cpp @@ -737,7 +737,7 @@ namespace mongo { connTo.done(); if ( ! ok ){ - errmsg = "_recvChunkStart failed: "; + errmsg = "moveChunk failed to engage TO-shard in the data transfer: "; assert( res["errmsg"].type() ); errmsg += res["errmsg"].String(); result.append( "cause" , res ); @@ -757,12 +757,12 @@ namespace mongo { res = res.getOwned(); conn.done(); - log(0) << "_recvChunkStatus : " << res << " my mem used: " << migrateFromStatus.mbUsed() << endl; + log(0) << "moveChunk data transfer progress: " << res << " my mem used: " << migrateFromStatus.mbUsed() << endl; if ( ! ok || res["state"].String() == "fail" ){ - log( LL_ERROR ) << "_recvChunkStatus error : " << res << endl; - errmsg = "_recvChunkStatus error"; - result.append( "cause" ,res ); + log( LL_WARNING ) << "moveChunk error transfering data caused migration abort: " << res << endl; + errmsg = "data transfer error"; + result.append( "cause" , res ); return false; } @@ -818,8 +818,6 @@ namespace mongo { res ); connTo.done(); - log() << "moveChunk commit result: " << res << endl; - if ( ! ok ){ { writelock lk( ns ); @@ -828,7 +826,8 @@ namespace mongo { shardingState.undoDonateChunk( ns , min , max , currVersion ); } - log() << "_recvChunkCommit failed: " << res << " resetting shard version to: " << currVersion << endl; + log() << "movChunk migrate commit not accepted by TO-shard: " << res + << " resetting shard version to: " << currVersion << endl; errmsg = "_recvChunkCommit failed!"; result.append( "cause" , res ); @@ -919,7 +918,7 @@ namespace mongo { } else { - log() << "moveChunk: no chunks left to update version for collection '" << ns << "'" << endl; + log() << "moveChunk moved last chunk out for collection '" << ns << "'" << endl; } updates.done(); @@ -957,7 +956,7 @@ namespace mongo { // // if the commit made it to the config, we'll see the chunk in the new shard and there's no action // if the commit did not make it, currently the only way to fix this state is to bounce the mongod so - // that the old state (before migrating) we'll be brought in + // that the old state (before migrating) be brought in log( LL_WARNING ) << "moveChunk commit outcome ongoing: " << cmd << " for command :" << cmdResult << endl; sleepsecs( 10 ); |