summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/collection_info_cache.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2014-10-30 18:00:58 -0400
committerEliot Horowitz <eliot@10gen.com>2014-10-31 07:22:48 -0400
commitc3bcf7a2b57627403e2ce68a5e1fb033e68de40a (patch)
treed84066f5074404f2e31a53e98b30d7d021cdbeec /src/mongo/db/catalog/collection_info_cache.cpp
parente1ef3e6371f59c6a6396e78b2a4c4d9a975e9396 (diff)
downloadmongo-c3bcf7a2b57627403e2ce68a5e1fb033e68de40a.tar.gz
CollectionInfoCache::reset should reset index keys under X lock
Diffstat (limited to 'src/mongo/db/catalog/collection_info_cache.cpp')
-rw-r--r--src/mongo/db/catalog/collection_info_cache.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/catalog/collection_info_cache.cpp b/src/mongo/db/catalog/collection_info_cache.cpp
index d9783b6db07..9797e16104f 100644
--- a/src/mongo/db/catalog/collection_info_cache.cpp
+++ b/src/mongo/db/catalog/collection_info_cache.cpp
@@ -52,10 +52,11 @@ namespace mongo {
_planCache(new PlanCache(collection->ns().ns())),
_querySettings(new QuerySettings()) { }
- void CollectionInfoCache::reset() {
+ void CollectionInfoCache::reset( OperationContext* txn ) {
LOG(1) << _collection->ns().ns() << ": clearing plan cache - collection info cache reset";
clearQueryCache();
_keysComputed = false;
+ computeIndexKeys( txn );
// query settings is not affected by info cache reset.
// index filters should persist throughout life of collection
}