diff options
-rw-r--r-- | src/mongo/db/concurrency/d_concurrency.cpp | 9 | ||||
-rw-r--r-- | src/mongo/db/concurrency/d_concurrency.h | 11 |
2 files changed, 0 insertions, 20 deletions
diff --git a/src/mongo/db/concurrency/d_concurrency.cpp b/src/mongo/db/concurrency/d_concurrency.cpp index 5e4b051178d..77458fa1882 100644 --- a/src/mongo/db/concurrency/d_concurrency.cpp +++ b/src/mongo/db/concurrency/d_concurrency.cpp @@ -272,15 +272,6 @@ Lock::CollectionLock::~CollectionLock() { } } -void Lock::CollectionLock::relockAsDatabaseExclusive(Lock::DBLock& dbLock) { - _lockState->unlock(_id); - - dbLock.relockWithMode(MODE_X); - - // don't need the lock, but need something to unlock in the destructor - _lockState->lock(_id, MODE_IX); -} - namespace { stdx::mutex oplogSerialization; // for OplogIntentWriteLock } // namespace diff --git a/src/mongo/db/concurrency/d_concurrency.h b/src/mongo/db/concurrency/d_concurrency.h index 469dbb76769..6ec596daf4c 100644 --- a/src/mongo/db/concurrency/d_concurrency.h +++ b/src/mongo/db/concurrency/d_concurrency.h @@ -337,17 +337,6 @@ public: CollectionLock(CollectionLock&&); ~CollectionLock(); - /** - * When holding the collection in MODE_IX or MODE_X, calling this will release the - * collection and database locks, and relocks the database in MODE_X. This is typically - * used if the collection still needs to be created. Upgrading would not be safe as - * it could lead to deadlock, similarly for relocking the database without releasing - * the collection lock. The collection lock will also be reacquired even though it is - * not really needed, as it simplifies invariant checking: the CollectionLock class - * has as invariant that a collection lock is being held. - */ - void relockAsDatabaseExclusive(Lock::DBLock& dbLock); - bool isLocked() const { return _result == LOCK_OK; } |