[SERVER-35563] The UUIDCatalog onCreateCollection observer should atomically unregister and re-register catalog entries Created: 12/Jun/18  Updated: 29/Oct/23  Resolved: 25/Jun/18

Status: Closed
Project: Core Server
Component/s: Catalog
Affects Version/s: None
Fix Version/s: 4.0.1, 4.1.1

Type: Bug Priority: Major - P3
Reporter: Louis Williams Assignee: Ben Judd
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-35319 renameCollection should re-register t... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Sprint: Storage NYC 2018-07-02
Participants:
Linked BF Score: 38

 Description   

DatabaseImpl::renameCollection uses the onCreateCollection UUID catalog observer, which does not atomically unregister and re-register the UUID of the collection being renamed.

There is a race condition reading while the UUID is not registered to any collection. The recent addition of replaceUUIDCatalogEntry, which atomically swaps the UUIDs, should be used instead.

The other problem of rename using the createCollection UUID catalog observer is tracked by SERVER-35319



 Comments   
Comment by Githook User [ 03/Jul/18 ]

Author:

{'username': 'Icantjuddle', 'name': 'Ben Judd', 'email': 'ben.judd@10gen.com'}

Message: SERVER-35563 Refactor register/remove UUID to _inlock functions to avoid race conditions

(cherry picked from commit 26b3b97ad24d8592e2f93e79f2dc18a8b76d3b3d)
Branch: v4.0
https://github.com/mongodb/mongo/commit/07517066b7d944374d49e0b668d60e490c7871a7

Comment by Githook User [ 25/Jun/18 ]

Author:

{'username': 'Icantjuddle', 'name': 'Ben Judd', 'email': 'ben.judd@10gen.com'}

Message: SERVER-35563 Refactor register/remove UUID to _inlock functions to avoid race conditions
Branch: master
https://github.com/mongodb/mongo/commit/26b3b97ad24d8592e2f93e79f2dc18a8b76d3b3d

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