mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 00:56:44 +01:00
moveshard cleaning checkpoint
This commit is contained in:
parent
2c72807a42
commit
74bb4f6029
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user