[DOCS-10528] Docs for SERVER-15723: Avoid G_X lock for rename_collection within database Created: 13/Jul/17  Updated: 13/Nov/23  Resolved: 02/Nov/17

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: 3.5.10, 3.4.10, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Emily Hall Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: rename
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-15723 Avoid G_X lock for rename_collection ... Closed
Duplicate
duplicates DOCS-10803 Highlight renameCollection caveats Closed
Participants:
Days since reply: 6 years, 14 weeks, 6 days ago
Epic Link: DOCS: 3.6 Server

 Description   

Documentation Request Summary:

Our documentation says that all operations on the database are blocked during the rename. Now this is only true for cross-database renames.

Engineering Ticket Description:

Probelm:

See https://github.com/mongodb/mongo/blob/master/src/mongo/db/commands/rename_collection.cpp#L113

            Lock::GlobalWrite globalWriteLock(txn->lockState());

Solution:
Scope this lock as a DB_X when renaming within a database. Renaming between databases probably still requires a G_X or perhaps two DB_X locks.



 Comments   
Comment by Githook User [ 02/Nov/17 ]

Author:

{'name': 'Kevin Albertson', 'username': 'kevinAlbs', 'email': 'kevin.albertson@10gen.com'}

Message: DOCS-10528 update lock info on renameCollections
Branch: master
https://github.com/mongodb/docs/commit/1926056f348ef3c6befc326d06a8c07f6a268acb

Generated at Thu Feb 08 08:00:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.