Priority: Major - P3
Affects Version/s: None
Fix Version/s: None
I was running the new automated test for sharded aggregation, jstests/aggregation/testshard1.js. This can be run stand-alone from the shell via load('jstests/aggregation/testshard1.js');
The first thing this test does is use a for loop to populate a collection which will them be used for the remainder of the test.
While the test was starting up, in another window I started up another mongo shell (--port 30999, in order to talk to the mongos started by the shell's ShardingTest class), so I could keep an eye on the progress of loading the collection. Here's what I saw:
$ ./mongo --port 30999
MongoDB shell version: 2.1.1-pre-
connecting to: 127.0.0.1:30999/test
mongos> show dbs
mongos> use aggShard
switched to db aggShard
mongos> show collections
The test script uploads 200000 items. There are no removes in the test script. Notice how the count overshoots, gets worse, and then hits the correct number; presumably migrations/balancing had stopped by then.