[SERVER-20854] Don't refresh database and collection information from config server while holding a mutex Created: 09/Oct/15 Updated: 28/Aug/18 Resolved: 04/Apr/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 3.4.4, 3.5.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Spencer Brody (Inactive) | Assignee: | Kaloian Manassiev |
| Resolution: | Done | Votes: | 9 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v3.4
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Sharding 2016-12-12, Sharding 2017-01-02, Sharding 2017-02-13, Sharding 2017-03-06, Sharding 2017-03-27, Sharding 2017-04-17 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
CatalogCache::getDatabase loads database metadata under the CatalogCache's mutex, blocking all operations while the config server query completes. This alone is pretty bad, but at least the CatalogCache shouldn't miss too often (CatalogCache caches database objects, database creation should be relatively infrequent). Even worse is the reloading of the ChunkManager, which loads the chunk ranges under the DBConfig's mutex. This means that while we are loading the chunk ranges for a collection after a shard version error, all CRUD operations on all (sharded or unsharded) collections in that database will block until the chunk reload is finished. |
| Comments |
| Comment by Githook User [ 13/Apr/17 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: (cherry picked from commit 0885a0adbb813727cc5a2083224ac0d89763c276) |
| Comment by Githook User [ 11/Apr/17 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: (cherry picked from commit 0c7ab1cdd8c6a1cde4c5b2ccb1feef4300d29708) |
| Comment by Githook User [ 04/Apr/17 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: |
| Comment by Githook User [ 02/Mar/17 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: |