[SERVER-29839] Protect against UUID->NSS mapping changing after looking it up in all commands that use parseNsOrUUID Created: 23/Jun/17  Updated: 30/Oct/23  Resolved: 30/Aug/17

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 3.5.13

Type: Bug Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Maria van Keulen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-33632 Make UUID catalog reload atomic Closed
related to SERVER-35699 Avoid holding locks during query parsing Backlog
is related to SERVER-34615 find by UUID can return NamespaceNotF... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Storage 2017-07-31, Storage 2017-08-21, Storage 2017-09-11
Participants:
Linked BF Score: 0

 Description   

There are currently at least 3 commands (find, listIndexes, and parallelCollectionScan) that use the parseNsOrUUID method to translate a UUID provided to the command into a namespace to run the command against. If, however, the collection with the given UUID is renamed after the namespace is looked up but before the command completes, the command can wind up operating on the wrong collection and returning incorrect results.



 Comments   
Comment by Githook User [ 30/Aug/17 ]

Author:

{'name': 'Maria van Keulen', 'username': 'mvankeulen94', 'email': 'maria@mongodb.com'}

Message: SERVER-29839 Protect from mid-command renames in parseNsOrUUID
Branch: master
https://github.com/mongodb/mongo/commit/49708981947fbd44c0b8afa8c24b9c586c25091d

Comment by Allison Chang [ 06/Jul/17 ]

Another function that this might be relevant for is UUIDCatalog::lookupNSSByUUID.

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