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

createIndexes command should check if index already exists with weak lock

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.9, 4.0.3, 4.1.4
    • Component/s: Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v4.0, v3.6
    • Sprint:
      Storage NYC 2018-09-24

      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

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: