[SERVER-72703] Downgrade $out's db lock to MODE_IX Created: 10/Jan/23 Updated: 19/Jan/24 Resolved: 18/Dec/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.1, 7.3.0-rc0, 7.0.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Damian Wasilewicz |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | storex-ranked | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Assigned Teams: |
Storage Execution NAMER
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Backport Requested: |
v7.2, v7.0, v6.0, v5.0, v4.4
|
||||||||||||||||||||||||
| Sprint: | Execution Team 2023-05-29, Execution Team 2023-06-12, Execution NAMR Team 2023-06-26, Execution NAMR Team 2023-07-10, Execution NAMR Team 2023-07-24, Execution NAMR Team 2023-08-07, Execution NAMR Team 2023-10-02, Execution Team 2023-12-11, Execution Team 2023-12-25 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||
| Linked BF Score: | 135 | ||||||||||||||||||||||||
| Description |
|
It looks like as of 4.2 the renameCollection command supports doing a rename - even with dropTarget: true - with only a MODE_IX lock, not MODE_X as is currently taken. At the very least, that lock acquisition could use a comment indicating why MODE_X is required. I think if we change the DB lock to MODE_X, we'll need to acquire both collection locks in MODE_X (and in the right order) to inspect and verify the index catalog and collection options, but that should be fine and is an improvement. |
| Comments |
| Comment by Githook User [ 12/Jan/24 ] |
|
Author: {'name': 'Damian Wasilewicz', 'email': '33820523+DamianWasilewicz@users.noreply.github.com', 'username': 'DamianWasilewicz'}Message:
(cherry picked from commit d31885ce2c61a2acf2d19e8ab30c00f3c4308f0e) GitOrigin-RevId: 352ae2d9d70cdf474078ac8d6cf39ca2fb3c0f8b |
| Comment by Githook User [ 02/Jan/24 ] |
|
Author: {'name': 'Damian Wasilewicz', 'email': 'damian.wasilewicz@mongodb.com', 'username': 'DamianWasilewicz'}Message: |
| Comment by Githook User [ 18/Dec/23 ] |
|
Author: {'name': 'Damian Wasilewicz', 'email': 'damian.wasilewicz@mongodb.com', 'username': 'DamianWasilewicz'}Message: GitOrigin-RevId: add971aec3dc798a608985f39681dbf8af62ceb9 |
| Comment by Steven Vannelli [ 05/Oct/23 ] |
|
We need to make sure we only access the collection under a collection lock |
| Comment by Damian Wasilewicz [ 05/Oct/23 ] |
|
This change was reverted because it caused BF-30104 , where not using an exclusive lock led to heap-use-after-free/invalid access error. It appears that changing the mode from X to IX exposed a bug on the query side. |
| Comment by Githook User [ 02/Oct/23 ] |
|
Author: {'name': 'Damian Wasilewicz', 'email': 'damian.wasilewicz@mongodb.com', 'username': 'DamianWasilewicz'}Message: Revert " |
| Comment by Damian Wasilewicz [ 20/Sep/23 ] |
|
Filed a follow up ticket to investigate these cases! |
| Comment by Githook User [ 20/Sep/23 ] |
|
Author: {'name': 'Damian Wasilewicz', 'email': 'damian.wasilewicz@mongodb.com', 'username': 'DamianWasilewicz'}Message: |