[SERVER-82029] Ensure update to config.collections in createCollection coordinator uses an index scan Created: 10/Oct/23  Updated: 29/Oct/23  Resolved: 13/Oct/23

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

Type: Bug Priority: Major - P3
Reporter: Allison Easton Assignee: Allison Easton
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding EMEA 2023-10-16
Participants:
Linked BF Score: 135

 Description   

The changes in SERVER-79157 changed the insert into config.collections as part of the create collection coordinator commit to an update. However, the update query is using only the uuid field. Since there is no index on config.collections for the uuid, this is resulting in a collection scan in order to do this update.

We should change this update query to include the _id field so that this query can be done using an index scan rather than a collection scan.



 Comments   
Comment by Githook User [ 13/Oct/23 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-82029 Ensure update to config.collections in createCollection coordinator uses an index scan
Branch: master
https://github.com/mongodb/mongo/commit/111a43b6bdfb31cadbd83341f637699dbecf6dbf

Generated at Thu Feb 08 06:48:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.