[SERVER-50031] createSystemIndexes should allow WriteConflictExceptions to escape Created: 30/Jul/20 Updated: 29/Oct/23 Resolved: 26/Oct/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Louis Williams | 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 | ||||
| Sprint: | Execution Team 2020-11-02 | ||||
| Participants: | |||||
| Linked BF Score: | 13 | ||||
| Description |
|
createSystemIndexes fasserts on errors, but it is possible for a WriteConflictException to return from createIndexesOnEmptyCollection. In the event of a WCE, the caller needs to be able to retry the entire operation. Currently, this crashes the server. The purpose of the fatal assertion appears to be to ensure all system indexes are built in a transactional way with the collection creation. We can make a similar assertion by asserting that createSystemIndexes is called inside of a WriteUnitOfWork. |
| Comments |
| Comment by Githook User [ 26/Oct/20 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |