[SERVER-44027] Remove global X lock for renameCollection between DBs Created: 15/Oct/19  Updated: 29/Oct/23  Resolved: 24/Oct/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.3.1, 4.2.2

Type: Task Priority: Major - P3
Reporter: Lingzhi Deng Assignee: Gregory Wlodarek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Documented
is documented by DOCS-13170 Investigate changes in SERVER-44027: ... Closed
Issue split
split from SERVER-43242 Deadlock involving commands acquiring... Closed
Related
is related to SERVER-44239 Ensure the parallel shell in lock_sta... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.2
Sprint: Execution Team 2019-11-04
Participants:

 Description   

Remove global X lock acquisition for renameCollection. This is because acquiring global lock in X mode can be blocked by prepared transactions. The enqueued global X lock can block oplog queries which need the global IS lock. If these oplog queries and the data replication are needed to satisfy the prepared transaction's write concern, then the prepare transaction and replication cannot make progress. Thus a deadlock occurs.

Alternatively, if removing global X lock is not an option, deprecate the usage or make sure it won't be blocked on prepare transactions.



 Comments   
Comment by Githook User [ 18/Nov/19 ]

Author:

{'username': 'GWlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'name': 'Gregory Wlodarek'}

Message: SERVER-44027 Remove global X lock for renameCollection between DBs
Branch: v4.2
https://github.com/mongodb/mongo/commit/d2b1e729f7a0cee6b83e0b10156dc72b4946080c

Comment by Githook User [ 25/Oct/19 ]

Author:

{'username': 'GWlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'name': 'Gregory Wlodarek'}

Message: SERVER-44027 Replace accidental database lock with a collection lock for the source target when renaming collections across databases
Branch: master
https://github.com/mongodb/mongo/commit/4403da71126ea32e37f059ce848898dfab22f720

Comment by Githook User [ 24/Oct/19 ]

Author:

{'username': 'GWlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'name': 'Gregory Wlodarek'}

Message: SERVER-44027 Remove global X lock for renameCollection between DBs
Branch: master
https://github.com/mongodb/mongo/commit/dc859def4ed7752661bdac92caf0afa63323edfd

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