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

Index creation NamespaceNotFound error handling omits some cases

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2022-09-05, Execution Team 2022-09-19, Execution Team 2022-10-03

    Description

      There's logic in the createIndexes command that turns a namespace not found into an ok: 1 response. This is the intended behavior, for example, when a collection is dropped while the index is being built.

      However, the check does not verify the namespace/uuid is actually the one the index is being built on. As shown in the log snippet below, a namespace not found on an internal collection resulted in a mis-classification.

      2022-02-03T15:39:44.629Z I  INDEX    [thread1] Index build: failed because collection dropped {"buildUUID":{"uuid":{"$uuid":"d1d9aca9-2b46-445c-a44c-c5f66ecf173e"}},"namespace":"unittests.timestampMultiIndexBuildsDuringRename","collectionUUID":{"uuid":{"$uuid":"d550b9f4-f76c-403e-9b44-a608c26f40d7"}},"exception":{"code":26,"codeName":"NamespaceNotFound","errmsg":"Caught exception during index builder (d1d9aca9-2b46-445c-a44c-c5f66ecf173e) initialization on namespaceunittests.timestampMultiIndexBuildsDuringRename (d550b9f4-f76c-403e-9b44-a608c26f40d7). 2 index specs provided. First index spec: { v: 2, key: { a: 1 }, name: \"a_1\" } :: caused by :: Collection not found: config.system.indexBuilds"}}
      

      Attachments

        Activity

          People

            matthew.saltz@mongodb.com Matthew Saltz (Inactive)
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: