diff options
author | Antonin Kral <a.kral@bobek.cz> | 2010-03-25 19:21:32 +0100 |
---|---|---|
committer | Antonin Kral <a.kral@bobek.cz> | 2010-03-25 19:21:32 +0100 |
commit | 0ca01a91ae0a3562e54c226e7b9512feb2ea83d0 (patch) | |
tree | 2b3886e435b0217d6afd63a213b04d32bb4b4f6f /s/d_logic.cpp | |
parent | a696359b248adef0cc8576fce3f473535e995136 (diff) | |
download | mongodb-0ca01a91ae0a3562e54c226e7b9512feb2ea83d0.tar.gz |
Imported Upstream version 1.4.0
Diffstat (limited to 's/d_logic.cpp')
-rw-r--r-- | s/d_logic.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/s/d_logic.cpp b/s/d_logic.cpp index cc627eb..2a9cde3 100644 --- a/s/d_logic.cpp +++ b/s/d_logic.cpp @@ -79,6 +79,7 @@ namespace mongo { class WriteBackCommand : public MongodShardCommand { public: + virtual LockType locktype(){ return NONE; } WriteBackCommand() : MongodShardCommand( "writebacklisten" ){} bool run(const char *cmdns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool){ @@ -90,8 +91,6 @@ namespace mongo { const OID id = e.__oid(); - dbtemprelease unlock; - if ( ! clientQueues[id.str()] ) clientQueues[id.str()] = new BlockingQueue<BSONObj>(); @@ -114,6 +113,8 @@ namespace mongo { help << " example: { setShardVersion : 'alleyinsider.foo' , version : 1 , configdb : '' } "; } + virtual LockType locktype(){ return WRITE; } // TODO: figure out how to make this not need to lock + bool run(const char *cmdns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool){ bool authoritative = cmdObj.getBoolField( "authoritative" ); @@ -247,6 +248,8 @@ namespace mongo { help << " example: { getShardVersion : 'alleyinsider.foo' } "; } + virtual LockType locktype(){ return WRITE; } // TODO: figure out how to make this not need to lock + bool run(const char *cmdns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool){ string ns = cmdObj["getShardVersion"].valuestrsafe(); if ( ns.size() == 0 ){ @@ -273,6 +276,8 @@ namespace mongo { virtual void help( stringstream& help ) const { help << "should not be calling this directly" << endl; } + + virtual LockType locktype(){ return WRITE; } bool run(const char *cmdns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool){ // so i have to start clone, tell caller its ok to make change @@ -342,6 +347,8 @@ namespace mongo { virtual void help( stringstream& help ) const { help << "should not be calling this directly" << endl; } + + virtual LockType locktype(){ return WRITE; } bool run(const char *cmdns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool){ // see MoveShardStartCommand::run |