33 #include "mongo/base/shim.h" 34 #include "mongo/db/collection_index_usage_tracker.h" 35 #include "mongo/db/query/plan_cache.h" 36 #include "mongo/db/query/query_settings.h" 37 #include "mongo/db/update_index_data.h" 42 class IndexDescriptor;
43 class OperationContext;
82 void init(OperationContext* opCtx);
90 void addedIndex(OperationContext* opCtx,
const IndexDescriptor*
desc);
98 void droppedIndex(OperationContext* opCtx, StringData indexName);
109 void notifyOfQuery(OperationContext* opCtx,
const std::set<std::string>& indexesUsed);
122 const NamespaceString
_ns;
PlanCache * getPlanCache() const
Get the PlanCache for this collection.
Definition: collection_info_cache_impl.cpp:169
UpdateIndexData _indexedPaths
Definition: collection_info_cache_impl.h:126
Collection *const const NamespaceString & ns
Definition: collection_info_cache_impl.cpp:53
void updatePlanCacheIndexEntries(OperationContext *opCtx)
Definition: collection_info_cache_impl.cpp:177
Copyright (C) 2014 MongoDB Inc.
Definition: bson_collection_catalog_entry.cpp:38
Collection *const collection
Definition: collection_info_cache_impl.cpp:53
Collection * _collection
Definition: collection_info_cache_impl.h:121
QuerySettings * getQuerySettings() const
Get the QuerySettings for this collection.
Definition: collection_info_cache_impl.cpp:173
bool _keysComputed
Definition: collection_info_cache_impl.h:125
void rebuildIndexData(OperationContext *opCtx)
Rebuilds cached information that is dependent on index composition.
Definition: collection_info_cache_impl.cpp:236
std::unique_ptr< QuerySettings > _querySettings
Definition: collection_info_cache_impl.h:133
CollectionIndexUsageMap getIndexUsageStats() const
Returns cached index usage statistics for this collection.
Definition: collection_info_cache_impl.cpp:244
Definition: collection_info_cache.h:49
this is NOT safe through a yield right now.
Definition: collection.h:160
CollectionInfoCacheImpl(Collection *collection, const NamespaceString &ns)
Definition: collection_info_cache_impl.cpp:58
void computeIndexKeys(OperationContext *opCtx)
Definition: collection_info_cache_impl.cpp:81
const NamespaceString _ns
Definition: collection_info_cache_impl.h:122
CollectionIndexUsageTracker _indexUsageTracker
Definition: collection_info_cache_impl.h:136
const UpdateIndexData & getIndexKeys(OperationContext *opCtx) const
Definition: collection_info_cache_impl.cpp:74
void addedIndex(OperationContext *opCtx, const IndexDescriptor *desc)
Register a newly-created index with the cache.
Definition: collection_info_cache_impl.cpp:218
void init(OperationContext *opCtx)
Builds internal cache state based on the current state of the Collection's IndexCatalog.
Definition: collection_info_cache_impl.cpp:203
bool _hasTTLIndex
Definition: collection_info_cache_impl.h:138
std::unique_ptr< PlanCache > _planCache
Definition: collection_info_cache_impl.h:129
this is for storing things that you want to cache about a single collection life cycle is managed for...
Definition: collection_info_cache_impl.h:49
void droppedIndex(OperationContext *opCtx, StringData indexName)
Deregister a newly-dropped index with the cache.
Definition: collection_info_cache_impl.cpp:228
Collection *const OperationContext *const opCtx
Definition: collection_impl.cpp:80
void clearQueryCache()
Removes all cached query plans.
Definition: collection_info_cache_impl.cpp:162
OperationContext const IndexDescriptor * desc
Definition: index_catalog_impl.cpp:97
~CollectionInfoCacheImpl()
Definition: collection_info_cache_impl.cpp:66
void notifyOfQuery(OperationContext *opCtx, const std::set< std::string > &indexesUsed)
Signal to the cache that a query operation has completed.
Definition: collection_info_cache_impl.cpp:150