diff options
author | James Wahlin <james.wahlin@10gen.com> | 2015-09-10 09:54:35 -0400 |
---|---|---|
committer | James Wahlin <james.wahlin@10gen.com> | 2015-09-10 20:55:50 -0400 |
commit | 8b205afd0ae74fd7351bc183e39b8931044f3987 (patch) | |
tree | a7f41025b1cdfeaf7eccbbbbe56421e8dc608d00 | |
parent | 405e3201e794d011e35972a9142f29fa6fde2754 (diff) | |
download | mongo-8b205afd0ae74fd7351bc183e39b8931044f3987.tar.gz |
SERVER-20327 Don't check index catalog when recording usage stats
-rw-r--r-- | src/mongo/db/catalog/collection_info_cache.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/catalog/collection_info_cache.cpp b/src/mongo/db/catalog/collection_info_cache.cpp index 1fe87f116aa..9682ee40899 100644 --- a/src/mongo/db/catalog/collection_info_cache.cpp +++ b/src/mongo/db/catalog/collection_info_cache.cpp @@ -119,10 +119,10 @@ void CollectionInfoCache::notifyOfQuery(OperationContext* txn, const std::set<std::string>& indexesUsed) { // Record indexes used to fulfill query. for (auto it = indexesUsed.begin(); it != indexesUsed.end(); ++it) { - if (NULL == _collection->getIndexCatalog()->findIndexByName(txn, *it)) { - // Index removed since the operation started. Nothing to report. - continue; - } + // This index should still exist, since the PlanExecutor would have been killed if the + // index was dropped (and we would not get here). + dassert(NULL != _collection->getIndexCatalog()->findIndexByName(txn, *it)); + _indexUsageTracker.recordIndexAccess(*it); } } |