[SERVER-63257] Index creation NamespaceNotFound error handling omits some cases Created: 03/Feb/22  Updated: 29/Oct/23  Resolved: 19/Sep/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Matthew Saltz (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2022-09-05, Execution Team 2022-09-19, Execution Team 2022-10-03
Participants:

 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"}}



 Comments   
Comment by Githook User [ 19/Sep/22 ]

Author:

{'name': 'Matthew Saltz', 'email': 'matthew.saltz@mongodb.com', 'username': 'saltzm'}

Message: SERVER-63257 Convert NamespaceNotFound error on config.system.indexBuilds to an anonymous error
Branch: master
https://github.com/mongodb/mongo/commit/01414fd3f2bc599a651a1b89536b142974784f37

Generated at Thu Feb 08 05:57:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.