createIndexes command should check if index already exists with weak lock

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Critical - P2
    • 3.6.9, 4.0.3, 4.1.4
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • v4.0, v3.6
    • Storage NYC 2018-09-24
    • 8
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Louis Williams
            Reporter:
            Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: