mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
get rid of gridCommands
This commit is contained in:
parent
1fce17f248
commit
0e2fd8c149
@ -26,12 +26,12 @@ assert.eq( 3, db2.count( { name : { $gte: "aaa" , $lt: "ddd" } } ) , "initial co
|
||||
s1.adminCommand( { movechunk : "test.foo" , find : { name : "aaa" } , to : s1.getOther( s1.getServer( "test" ) ).name } );
|
||||
|
||||
assert.eq( 3, db1.count( { name : { $gte: "aaa" , $lt: "ddd" } } ) , "post count mongos1" );
|
||||
// TOFIX
|
||||
|
||||
// The second mongos still thinks its shard mapping is valid and accepts a cound
|
||||
//assert.eq( 3, db2.count( { name : { $gte: "aaa" , $lt: "ddd" } } ) , "post count mongos2" ); // ***** asserting *****
|
||||
assert.eq( 3, db2.count( { name : { $gte: "aaa" , $lt: "ddd" } } ) , "post count mongos2" ); // ***** asserting *****
|
||||
|
||||
db2.findOne();
|
||||
|
||||
assert.eq( 3, db2.count( { name : { $gte: "aaa" , $lt: "ddd" } } ) );
|
||||
|
||||
s1.stop();
|
||||
s1.stop();
|
||||
|
@ -45,12 +45,9 @@ namespace mongo {
|
||||
|
||||
namespace dbgrid_cmds {
|
||||
|
||||
set<string> dbgridCommands;
|
||||
|
||||
class GridAdminCmd : public Command {
|
||||
public:
|
||||
GridAdminCmd( const char * n ) : Command( n , false, tolowerString(n).c_str() ){
|
||||
dbgridCommands.insert( n );
|
||||
}
|
||||
virtual bool slaveOk() const {
|
||||
return true;
|
||||
@ -149,23 +146,6 @@ namespace mongo {
|
||||
time_t _started;
|
||||
} cmdServerStatus;
|
||||
|
||||
class ListGridCommands : public GridAdminCmd {
|
||||
public:
|
||||
ListGridCommands() : GridAdminCmd( "gridCommands" ){}
|
||||
bool run(const string& , BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool){
|
||||
|
||||
BSONObjBuilder arr;
|
||||
int num=0;
|
||||
for ( set<string>::iterator i = dbgridCommands.begin(); i != dbgridCommands.end(); i++ ){
|
||||
string s = BSONObjBuilder::numStr( num++ );
|
||||
arr.append( s.c_str() , *i );
|
||||
}
|
||||
|
||||
result.appendArray( "commands" , arr.done() );
|
||||
return true;
|
||||
}
|
||||
} listGridCommands;
|
||||
|
||||
class FsyncCommand : public GridAdminCmd {
|
||||
public:
|
||||
FsyncCommand() : GridAdminCmd( "fsync" ){}
|
||||
|
Loading…
Reference in New Issue
Block a user