summaryrefslogtreecommitdiff
path: root/src/mongo/s/d_state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/d_state.cpp')
-rw-r--r--src/mongo/s/d_state.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/s/d_state.cpp b/src/mongo/s/d_state.cpp
index c70ca52ea55..08560b9149a 100644
--- a/src/mongo/s/d_state.cpp
+++ b/src/mongo/s/d_state.cpp
@@ -48,6 +48,7 @@
#include "mongo/db/commands.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/db.h"
+#include "mongo/db/operation_context_impl.h"
#include "mongo/db/wire_version.h"
#include "mongo/db/repl/is_master.h"
#include "mongo/client/connpool.h"
@@ -60,7 +61,6 @@
#include "mongo/util/concurrency/mutex.h"
#include "mongo/util/concurrency/ticketholder.h"
-using namespace std;
namespace mongo {
@@ -558,7 +558,8 @@ namespace mongo {
{
// DBLock needed since we're now potentially changing the metadata, and don't want
// reads/writes to be ongoing.
- Lock::DBWrite writeLk( ns );
+ OperationContextImpl txn;
+ Lock::DBWrite writeLk(txn.lockState(), ns );
//
// Get the metadata now that the load has completed
@@ -1241,7 +1242,7 @@ namespace mongo {
}
bool run(OperationContext* txn, const string& dbname, BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) {
- Lock::DBWrite dbXLock(dbname);
+ Lock::DBWrite dbXLock(txn->lockState(), dbname);
Client::Context ctx(dbname);
shardingState.appendInfo( result );