summaryrefslogtreecommitdiff
path: root/s/commands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 's/commands.cpp')
-rw-r--r--s/commands.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/s/commands.cpp b/s/commands.cpp
index 3b58628606d..af053754546 100644
--- a/s/commands.cpp
+++ b/s/commands.cpp
@@ -339,15 +339,10 @@ namespace mongo {
log() << "splitting: " << ns << " shard: " << old << endl;
- unsigned long long nextTS = grid.getNextOpTime();
- ScopedDbConnection conn( old.getServer() );
- BSONObj lockResult;
- if ( ! setShardVersion( conn.conn() , ns , nextTS , true , lockResult ) ){
- log() << "setShardVersion for split failed!" << endl;
- errmsg = "setShardVersion failed to lock server. is someone else doing something?";
+ if ( ! lockNamespaceOnServer( old.getServer() , ns ) ){
+ log() << errmsg << endl;
return false;
}
- conn.done();
if ( middle.isEmpty() )
old.split();