summaryrefslogtreecommitdiff
path: root/s/strategy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 's/strategy.cpp')
-rw-r--r--s/strategy.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/s/strategy.cpp b/s/strategy.cpp
index dc644cb86e7..6a252f68d30 100644
--- a/s/strategy.cpp
+++ b/s/strategy.cpp
@@ -106,5 +106,16 @@ namespace mongo {
return conn.runCommand( "admin" , cmd , result );
}
-
+
+ bool lockNamespaceOnServer( const string& server , const string& ns ){
+ ScopedDbConnection conn( server );
+ bool res = lockNamespaceOnServer( conn.conn() , ns );
+ conn.done();
+ return res;
+ }
+
+ bool lockNamespaceOnServer( DBClientBase& conn , const string& ns ){
+ BSONObj lockResult;
+ return setShardVersion( conn , ns , grid.getNextOpTime() , true , lockResult );
+ }
}