[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:
Related
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: SERVER-50031 createSystemIndexes should allow WriteConflictExceptions to escape
Branch: master
https://github.com/mongodb/mongo/commit/f8594ceefa7254f2d20d6cf1e0222ad568c03f39

Generated at Thu Feb 08 05:21:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.