diff options
author | Aaron <aaron@10gen.com> | 2009-04-03 17:51:04 -0400 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-04-03 17:51:04 -0400 |
commit | e079f2c3f3aec6cd28a9479ccd868578164e0598 (patch) | |
tree | 53aace6b221d4b2b6fa02877966c1eb8f891629d | |
parent | 1896a06093abe6176c0c9f6b77fa4b4549c70eb0 (diff) | |
parent | 74bb4f6029007cce3146b42f02801148b9dd8e12 (diff) | |
download | mongo-e079f2c3f3aec6cd28a9479ccd868578164e0598.tar.gz |
Merge branch 'master' of git@github.com:mongodb/mongo
-rw-r--r-- | s/d_logic.cpp | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/s/d_logic.cpp b/s/d_logic.cpp index c2733897698..8cf7900a08f 100644 --- a/s/d_logic.cpp +++ b/s/d_logic.cpp @@ -157,7 +157,7 @@ namespace mongo { virtual void help( stringstream& help ) const { help << " example: { getShardVersion : 'alleyinsider.foo' } "; } - + bool run(const char *cmdns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool){ string ns = cmdObj["getShardVersion"].valuestrsafe(); if ( ns.size() == 0 ){ @@ -179,6 +179,35 @@ namespace mongo { } getShardVersion; + class MoveShardStartCommand : public MongodShardCommand { + public: + MoveShardStartCommand() : MongodShardCommand( "moveshard.start" ){} + virtual void help( stringstream& help ) const { + help << "should not be calling this directly" << endl; + } + + bool run(const char *cmdns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool){ + // i assume i'm already locked + // so i have to start clone, tell caller its ok to make change + // then finish calls finish, and then deletes data when cursors are done + return false; + } + + } moveShardStartCmd; + + class MoveShardFinishCommand : public MongodShardCommand { + public: + MoveShardFinishCommand() : MongodShardCommand( "moveshard.finish" ){} + virtual void help( stringstream& help ) const { + help << "should not be calling this directly" << endl; + } + + bool run(const char *cmdns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool){ + // see MoveShardStartCommand::run + return false; + } + + } moveShardFinishCmd; /** * @ return true if not in sharded mode |