diff --git a/s/d_migrate.cpp b/s/d_migrate.cpp index 372023aa54c..7246ea985ef 100644 --- a/s/d_migrate.cpp +++ b/s/d_migrate.cpp @@ -747,7 +747,7 @@ namespace mongo { myVersion.incMajor(); { - dblock lk; + writelock lk( ns ); assert( myVersion > shardingState.getVersion( ns ) ); shardingState.setVersion( ns , myVersion ); assert( myVersion == shardingState.getVersion( ns ) ); @@ -766,7 +766,7 @@ namespace mongo { log() << "moveChunk commit result: " << res << endl; if ( ! ok ){ { - dblock lk; + writelock lk( ns ); shardingState.setVersion( ns , currVersion ); assert( currVersion == shardingState.getVersion( ns ) ); }