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

If a createIndexes request specifies two identical indexes, a IndexAlreadyExists error is thrown and no index is ever created

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • ALL
    • Storage NYC 2019-05-06, Execution Team 2019-08-12

      MultiIndexBlock::init has a for-loop for initializing indexes in-memory and on disk. In the for-loop we call IndexCatalog::prepareSpecForCreate to check for errors: bad spec, already exists.

      The first loop is fine, and sets up the index. The second loop will get an IndexAlreadyExists error from IndexCatalog::prepareSpecForCreate. This error will not get swallowed – we do swallow IndexAlreadyExists errors encountered earlier in the command. The user will get an IndexAlreadyExists error and no index will have been created.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: