[SERVER-71597] Fix race condition on createDatabase for case sensitive dbName Created: 23/Nov/22  Updated: 29/Oct/23  Resolved: 04/Jan/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 5.0.14, 6.0.3, 6.2.0-rc4
Fix Version/s: 5.0.15, 6.0.4, 6.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Enrico Golfieri Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-71368 Stop excluding tests that drop collec... Closed
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Backport Requested:
v6.2, v6.0, v5.0, v4.4, v4.2
Sprint: Sharding EMEA 2022-12-26
Participants:

 Description   

The lock on createDatabase does not take into account that two parallel createDatabase with different case ( example: database0, DATABASE0) would not serialise.

This as a consequence, will create both databases, leading to the catalog cache not being able to refresh 



 Comments   
Comment by Githook User [ 05/Jan/23 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-71597 Fix race condition on createDatabase for case sensitive dbName

(cherry picked from commit e9c0261130bd3e06ab5d206c6b6632ab96758733)
(cherry picked from commit f08c99d8981924a00fc96d7c3cf7e27663007d69)
Branch: v5.0
https://github.com/mongodb/mongo/commit/7f76ccd37e8cc81b3fae25c182a1b39092455104

Comment by Githook User [ 05/Jan/23 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-71597 Fix race condition on createDatabase for case sensitive dbName

(cherry picked from commit e9c0261130bd3e06ab5d206c6b6632ab96758733)
Branch: v6.0
https://github.com/mongodb/mongo/commit/d5670b47e3cf3aff1c8ec057aa0c8dd5a2849a14

Comment by Githook User [ 04/Jan/23 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-71597 Fix race condition on createDatabase for case sensitive dbName
Branch: master
https://github.com/mongodb/mongo/commit/e9c0261130bd3e06ab5d206c6b6632ab96758733

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