[SERVER-9260] Race in hash_presplit.js Created: 05/Apr/13  Updated: 11/Jul/16  Resolved: 09/Apr/13

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.4.1
Fix Version/s: 2.4.4, 2.5.0

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-9258 hash_presplit.js failure Closed
Operating System: ALL
Participants:

 Description   

The js test contains 3 tests running on the same cluster. The first test creates a hashed sharded collection. The second test will do the same with numInitialChunks at 500. At the time of the second test, the race will cause the moveChunk to fail and result in the chunks not being evenly distributed across the shards.

The race condition is as follows:
1. First test moves the minKey->maxKey chunk from shard0001 to shard0000.
2. fromShard (shard0001) tells toShard (shard0000) to commit and toShard sets the state to commit. The separate thread in toShard that is actually running the migration should see this change and terminate the thread. However, since this is on another thread, there is no guarantee on when this will exactly happen.
3. Second test tries to do a moveChunk from shard0001 to shard0000 but it fails because the shard0000 hasn't completely set the migration status to not active.

Note: this was causing the cause of this failure - http://buildlogs.mongodb.org/V2.4%20Linux%2064-bit/builds/27/test/sharding/hash_presplit.js



 Comments   
Comment by auto [ 22/May/13 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-9260 Race in hash_presplit.js

Split the each test case into different files to isolate them from each other.
Branch: v2.4
https://github.com/mongodb/mongo/commit/e73f081b184431b97f81e98d6eca097a2195f6e8

Comment by auto [ 09/Apr/13 ]

Author:

{u'date': u'2013-04-05T15:30:08Z', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-9260 Race in hash_presplit.js

Split the each test case into different files to isolate them from each other.
Branch: master
https://github.com/mongodb/mongo/commit/8f18c1f029f040760bafa222fa2976d3102e579f

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