Permalink
Browse files

Merge branch 'master' of github.com:mongodb/mongo

  • Loading branch information...
2 parents 486308c + 9a96dd0 commit bc615678e076f4d5455814feca73fde4fdd2f2aa @astaple astaple committed Jul 20, 2010
Showing with 17 additions and 1 deletion.
  1. +3 −1 db/client.h
  2. +14 −0 jstests/sharding/remove1.js
View
@@ -227,7 +227,9 @@ namespace mongo {
};
inline Client& cc() {
- return *currentClient.get();
+ Client * c = currentClient.get();
+ assert( c );
+ return *c;
}
/* each thread which does db operations has a Client object in TLS.
@@ -0,0 +1,14 @@
+s = new ShardingTest( "remove_shard1", 2 );
+
+assert.eq( 2, s.config.shards.count() , "initial server count wrong" );
+
+// first remove puts in draining mode, second remove
+assert( s.admin.runCommand( { removeshard: "shard0" } ).ok , "failed to start draining shard" );
+assert( s.admin.runCommand( { removeshard: "shard0" } ).ok , "failed to remove shard" );
+assert.eq( 1, s.config.shards.count() , "removed server still appears in count" );
+
+// to fix in SERVER-1418
+// assert( s.admin.runCommand( { addshard: "127.0.0.1:43415", allowLocal : true } ).ok, "failed to add shard" );
+// assert.eq( 2, s.config.shards.count(), "new server does not appear in count" );
+
+s.stop()

0 comments on commit bc61567

Please sign in to comment.