[SERVER-41014] runCreateIndexesWithCoordinator does not correctly relock the database Created: 04/May/19 Updated: 29/Oct/23 Resolved: 04/Jun/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.0-rc3, 4.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Geert Bosch | Assignee: | Benety Goh |
| Resolution: | Fixed | Votes: | 0 |
| 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: |
v4.2
|
||||||||||||||||||||||||
| Sprint: | Storage NYC 2019-05-20, Execution Team 2019-06-03, Execution Team 2019-06-17 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||
| Description |
|
At the beginning of this code in runCreateIndexesWithCoordinator, a collection lock is acquired in MODE_IX using AutoGetCollection. This also locks the database in MODE_IX, but this lock is not yielded before trying to relock the database with MODE_X. This results in a conversion of the database lock instead of a relock, potentially resulting in deadlock. |
| Comments |
| Comment by Githook User [ 29/Jun/19 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit f6e5ad7fe565d291f7333966b5f0355e7c06650a) |
| Comment by Githook User [ 29/Jun/19 ] |
|
Author: {'name': 'Benety Goh', 'username': 'benety', 'email': 'benety@mongodb.com'}Message: (cherry picked from commit 0a17878018fb5d14d8eff2f2c12b3aa7c4d21958) |
| Comment by Githook User [ 29/Jun/19 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit 47ca83f447f651fa757d995bc65638d7599e1e5a) |
| Comment by Githook User [ 04/Jun/19 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: Revert " This reverts commit 47ca83f447f651fa757d995bc65638d7599e1e5a. |
| Comment by Githook User [ 04/Jun/19 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Githook User [ 03/Jun/19 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Githook User [ 03/Jun/19 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |