[SERVER-23930] Race condition between addShard and ShardRegistry reload Created: 26/Apr/16 Updated: 21/Nov/16 Resolved: 26/Apr/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.2.5, 3.3.5 |
| Fix Version/s: | 3.2.8, 3.3.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kaloian Manassiev | Assignee: | Kaloian Manassiev |
| Resolution: | Done | Votes: | 0 |
| Labels: | code-and-test | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Completed: | |||||||||
| Participants: | |||||||||
| Linked BF Score: | 0 | ||||||||
| Description |
|
If one thread starts reloading the shard registry, all other calls to reload will block waiting for it to complete. If addShard runs concurrently with the reload, it is possible that the initial reload will not see the newly added shard and the reload initiated by addShard will do nothing, assuming that the first reload saw the latest state. This is a race condition, which can cause shardCollection calls with sharded key to not use newly added shards. |
| Comments |
| Comment by Githook User [ 24/Jun/16 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: |
| Comment by Githook User [ 24/Jun/16 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: Revert " This reverts commit 13b915aac8cbdceb4fee6b972dbd821003d9d5e2. |
| Comment by Githook User [ 24/Jun/16 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: Backported commit c2538292d6e731366b8c53cd04efe3a035738ab9. |
| Comment by Githook User [ 26/Apr/16 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: |
| Comment by Githook User [ 26/Apr/16 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: Revert " This reverts commit 6dfaea7ca3e29e421a86420de20fa11cdae690b6. |
| Comment by Githook User [ 26/Apr/16 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: |