[SERVER-15848] copydb appears to take out a G_X lock in some circumstances Created: 28/Oct/14  Updated: 06/Dec/22  Resolved: 15/Aug/18

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

Type: Bug Priority: Minor - P4
Reporter: Alvin Richards (Inactive) Assignee: Backlog - Storage Execution Team
Resolution: Done Votes: 0
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Operating System: ALL
Sprint: Quint Iteration 3
Participants:

 Description   

Problem

From copydb.cpp

https://github.com/mongodb/mongo/blob/master/src/mongo/db/commands/copydb.cpp#L190

            if (fromSelf) {
                // SERVER-4328 todo lock just the two db's not everything for the fromself case
                Lock::GlobalWrite lk(txn->lockState());
                return cloner.go(txn, todb, fromhost, cloneOptions, NULL, errmsg);
            }

Solution

For this case, perhaps taking out two DB_X locks rather than a G_X lock.



 Comments   
Comment by Asya Kamsky [ 15/Aug/18 ]

copyDB has been removed, SERVER-36257, closing.

 

Generated at Thu Feb 08 03:39:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.