[SERVER-5426] double counting data during chunk migrations Created: 27/Mar/12  Updated: 27/Mar/12  Resolved: 27/Mar/12

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Chris Westin Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-3884 aggregation: add automated tests for... Closed
Operating System: ALL
Participants:

 Description   

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
admin (empty)
aggShard 0.15625GB
config 0.0625GB
mongos> use aggShard
switched to db aggShard
mongos> show collections
system.indexes
ts1
mongos> db.ts1.count();
53503
mongos> db.ts1.count();
200919
mongos> db.ts1.count();
202755
mongos> db.ts1.count();
200000

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.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 27/Mar/12 ]

SERVER-3645

Comment by Chris Westin [ 27/Mar/12 ]

Added SERVER-3884 as a dependency because you'll need that committed if you want to use or look at the test script created for that.

Generated at Thu Feb 08 03:08:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.