[SERVER-61601] Determine if global lock upgrade is necessary when implicitly creating collection during createIndexes Created: 18/Nov/21  Updated: 29/Oct/23  Resolved: 02/Jun/22

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

Type: Task Priority: Major - P3
Reporter: Dan Larkin-York Assignee: Yuhong Zhang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-60621 Investigate if we can ban upgrading t... Closed
Problem/Incident
is caused by SERVER-48428 createIndexes should wait for user pr... Closed
Related
related to SERVER-55755 Add a 'does_not_support_stepdowns' ta... Closed
related to SERVER-54169 update geo_s2disjoint_holes.js to che... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-05-16, Execution Team 2022-05-30, Execution Team 2022-06-13
Participants:

 Description   

SERVER-48428 changed the createIndexes command to take a global IS lock instead of IX. This has the effect that when implicitly creating a collection, the global lock is upgraded to IX, which we want to avoid. We should determine whether there is a way to get around this without causing further issues.



 Comments   
Comment by Githook User [ 02/Jun/22 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'yuhong.zhang@mongodb.com', 'username': 'YuhongZhang98'}

Message: SERVER-61601 Avoid upgrading locks when implicitly creating collection during createIndexes
Branch: master
https://github.com/mongodb/mongo/commit/2b011507f069c89981f084ac7b8e0eaf06bb6ea3

Comment by Yuhong Zhang [ 01/Jun/22 ]

The ticket SERVER-48428 intended to fix the testing issue by letting the createIndexes command finish thus waiting for the secondary nodes to abort the index builds. The tests were improved in separate tickets later to avoid this issue, and the fix introduced the lock upgrading issue in the server code. So we decide to just switch back to holding MODE_IX lock.

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