[SERVER-58603] ensureTempReshardingCollectionExistsWithIndexes may hit an invariant if collection was previously dropped Created: 15/Jul/21 Updated: 29/Oct/23 Resolved: 29/Jul/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.3, 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Haley Connelly | Assignee: | Randolph Tan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | PM-234-M3, PM-234-T-lifecycle | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v5.0
|
||||||||||||||||
| Sprint: | Sharding 2021-08-09 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 26 | ||||||||||||||||
| Story Points: | 1 | ||||||||||||||||
| Description |
|
A (albeit unlikely) crash could occur in the following scenario
|
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 20/Aug/21 ] |
|
Author: {'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}Message: (cherry picked from commit 6bf3ad77bb5bcc9c07ef38110e687d3a55ef40f7) |
| Comment by Githook User [ 29/Jul/21 ] |
|
Author: {'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}Message: |
| Comment by Max Hirschhorn [ 21/Jul/21 ] |
|
I think a solution here could be for the RecipientStateMachine to throw an exception in the situation where a namespace with the reshardingUUID already exists and has a namespace string other than the temporary resharding collection. It is fine to drop and reacquire locks around this check because only the thread calling RecipientStateMachine::run() would ever create or drop the temporary resharding collection so there's no real concurrency for these operations. |