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

createIndexes command should check if index already exists with weak lock

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Critical - P2 Critical - P2
    • 3.6.9, 4.0.3, 4.1.4
    • None
    • Storage
    • None
    • Fully Compatible
    • v4.0, v3.6
    • Storage NYC 2018-09-24
    • 8

    Description

      Currently createIndexes command takes the locks it needs to actual create an index.  If the index already exists (as is the case in a lot of scenarios where "just in case" createIndex is sent periodically or before running some process) concurrency could benefit significantly from checking if the index already exists under a weak lock.

      This would benefit cases where the index exists as is (success returned) or the index exists but with different options (failure returned) - neither of these would contribute to command requiring a strong lock.

      Attachments

        Activity

          People

            louis.williams@mongodb.com Louis Williams
            asya.kamsky@mongodb.com Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: