[SERVER-47671] Check DatabaseShardingState for index build commit under an exception handler Created: 20/Apr/20 Updated: 29/Oct/23 Resolved: 08/May/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc5, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Louis Williams |
| 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: | 30 | ||||||||
| Description |
|
This invariant makes an assumption that index builds will not throw database exceptions except for when they commit, and we hold an X collection lock. I thought I covered every exception-throwing region of index builds, but I think I missed a spot. We should move this DatabaseShardingState version check inside the subsequent try-catch block. We're already holding an X lock there so it will abort the index build as usual if the assertion fails. |
| Comments |
| Comment by Githook User [ 08/May/20 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: (cherry picked from commit 8cb73850ec6b902c0d8fc1c5c0592ddabbdbfc67) |
| Comment by Githook User [ 07/May/20 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: |