Info
Threads may try to acquire two locks in different orders, potentially causing deadlock
Defect 100781 (STATIC_C)
Checker ORDER_REVERSAL (subcategory none)
File: /src/mongo/db/repl/database_cloner.cpp
Function mongo::repl::DatabaseCloner::_collectionClonerCallback(const mongo::Status &, const mongo::NamespaceString &)
Top User Comments
william.schultz commented on Thu, 6 Jul 2017 16:26:43 +0000:
The Coverity analysis claims that we recursively acquire the DatabaseCloner::_mutex in DatabaseCloner::_collectionClonerCallback when we call DatabaseCloner::_finishCallback_inlock which calls DatabaseCloner::_finishCallback_inlock. However, DatabaseCloner::_finishCallback_inlock always unlocks the lock first if necessary, avoiding this scenario.