[SERVER-41947] Disallow using the "system.views" collection name as the source or target names in the rename command Created: 27/Jun/19 Updated: 29/Oct/23 Resolved: 28/Aug/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.1, 4.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Gregory Wlodarek | Assignee: | Xiangyu Yao (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | KS, execution_intern_2019 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||
| Backport Requested: |
v4.2
|
||||||||||||||||||||||||||||
| Sprint: | Execution Team 2019-08-26, Execution Team 2019-09-09 | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Linked BF Score: | 5 | ||||||||||||||||||||||||||||
| Description |
|
This is a bug fix for a build failure where the following scenario leads to a deadlock: T1: Rename command is renaming 'test.coll' to 'test.system.views', so it has the MODE_IX on 'test' and MODE_X on both 'coll' and 'system.views'. The next step is to check if 'coll' is a view by calling the ViewCatalog::lookup() and waiting to acquire the ViewCatalog mutex which is currently held by T2. T2: Running CountCmd on a collection that didn't exist, but in AutoGetCollection we check if it could be a view and call ViewCatalog::lookup(), here we see that the ViewCatalog is invalidated, so we call _reloadIfNeeded. Now _reloadIfNeeded() uses the DurableViewCatalog::iterate but that requires the MODE_IS lock on the 'test.system.views' collection which is currently held by T1. So we have a deadlock where: |
| Comments |
| Comment by Githook User [ 29/Aug/19 ] |
|
Author: {'name': 'Xiangyu Yao', 'username': 'xy24', 'email': 'xiangyu.yao@mongodb.com'}Message: (cherry picked from commit 18f95f8ad46c685d8529dba2d5655b3e4ef968c1) |
| Comment by Githook User [ 28/Aug/19 ] |
|
Author: {'email': 'xiangyu.yao@mongodb.com', 'name': 'Xiangyu Yao', 'username': 'xy24'}Message: |
| Comment by Githook User [ 19/Aug/19 ] |
|
Author: {'username': 'xy24', 'email': 'xiangyu.yao@mongodb.com', 'name': 'Xiangyu Yao'}Message: Revert " This reverts commit ab5e8175f64c33606861c8b659e3708944177871. |
| Comment by Githook User [ 19/Aug/19 ] |
|
Author: {'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com', 'username': 'xy24'}Message: |