[SERVER-48152] renameCollectionAndDropTarget() should check for background operations before calling preRenameCollection() Created: 12/May/20 Updated: 29/Oct/23 Resolved: 12/May/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc6, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Gregory Wlodarek | Assignee: | Gregory Wlodarek |
| 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.4
|
||||||||
| Sprint: | Execution Team 2020-05-18 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 38 | ||||||||
| Description |
|
This is related to a build failure on non-document level locking storage engines. The call to OpObserver::preRenameCollection here will get the locks on the Oplog and maintain them during the duration of the WriteUnitOfWork. The check for assertNoIndexBuildInProgForCollection() requires the IndexBuildsCoordinator _mutex. But if we have an operation that is already holding the _mutex and is waiting for the Oplog locks, we will deadlock. To solve this, we should check for background operations prior to calling preRenameCollection(). |
| Comments |
| Comment by Githook User [ 12/May/20 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: (cherry picked from commit c4c5768798b72027a7b40eb0bbf4455f7e9564b9) |
| Comment by Githook User [ 12/May/20 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: |