Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-50031

createSystemIndexes should allow WriteConflictExceptions to escape

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.9.0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2020-11-02
    • 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.

      Attachments

        Activity

          People

            benety.goh@mongodb.com Benety Goh
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: