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

createSystemIndexes should allow WriteConflictExceptions to escape

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Execution Team 2020-11-02
    • 13

      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.

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

              Created:
              Updated:
              Resolved: