Revert "SERVER-695 don't destroy static global mutexes"

This reverts commit 714ec2fdc8.
This commit is contained in:
Aaron
2010-03-10 00:39:26 -08:00
parent 26b6ffe30a
commit eb7cde3e75
50 changed files with 153 additions and 204 deletions

View File

@@ -220,7 +220,7 @@ namespace mongo {
void QueryPlan::registerSelf( long long nScanned ) const {
if ( fbs_.matchPossible() ) {
scoped_lock lk(NamespaceDetailsTransient::_qcMutex);
boostlock lk(NamespaceDetailsTransient::_qcMutex);
NamespaceDetailsTransient::get_inlock( ns() ).registerIndexForPattern( fbs_.pattern( order_ ), indexKey(), nScanned );
}
}
@@ -340,7 +340,7 @@ namespace mongo {
}
if ( honorRecordedPlan_ ) {
scoped_lock lk(NamespaceDetailsTransient::_qcMutex);
boostlock lk(NamespaceDetailsTransient::_qcMutex);
NamespaceDetailsTransient& nsd = NamespaceDetailsTransient::get_inlock( ns );
BSONObj bestIndex = nsd.indexForPattern( fbs_.pattern( order_ ) );
if ( !bestIndex.isEmpty() ) {
@@ -419,7 +419,7 @@ namespace mongo {
if ( res->complete() || plans_.size() > 1 )
return res;
{
scoped_lock lk(NamespaceDetailsTransient::_qcMutex);
boostlock lk(NamespaceDetailsTransient::_qcMutex);
NamespaceDetailsTransient::get_inlock( fbs_.ns() ).registerIndexForPattern( fbs_.pattern( order_ ), BSONObj(), 0 );
}
init();