[SERVER-23598] Race in config.version intialization Created: 07/Apr/16 Updated: 25/Jan/17 Resolved: 07/Apr/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.3.4 |
| Fix Version/s: | 3.2.10, 3.3.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Randolph Tan | Assignee: | Randolph Tan |
| Resolution: | Done | Votes: | 0 |
| Labels: | code-only | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Backport Completed: | |||||
| Sprint: | Sharding 13 (04/22/16) | ||||
| Participants: | |||||
| Linked BF Score: | 0 | ||||
| Description |
|
Mongos currently assumes that if it can't find the config.version document and the config.shards is not empty, then the config server metadata is pre v2.4. The problem is that mongos queries the config.version first, and the config.shards later. Which means that another mongos could have inserted the config.version document and populated the config.shards in between the config.version and config.shards query (or alternatively, the secondary would have catched up to that point). |
| Comments |
| Comment by Githook User [ 18/Aug/16 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: Avoid the race by reversing the order of the check on config.version and config.shards collection |
| Comment by Githook User [ 07/Apr/16 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: Removed the check to determine if config metadata is pre v2.4. Now that config servers are required to be replica sets, they are guaranteed to have the metadata that is at least from v3.2. |