diff options
author | James Wahlin <james.wahlin@10gen.com> | 2015-09-30 17:41:56 -0400 |
---|---|---|
committer | James Wahlin <james.wahlin@10gen.com> | 2015-10-07 15:42:22 -0400 |
commit | ec97a61067e2dc3f9c4e58a9d66b5e1f2600f978 (patch) | |
tree | 40c67ec652a87b17b794a8ba5fc5aa3b4fc3e99e /src/mongo/db/collection_index_usage_tracker.cpp | |
parent | 33167b814bb9d8962205a85fed34c9d88942db83 (diff) | |
download | mongo-ec97a61067e2dc3f9c4e58a9d66b5e1f2600f978.tar.gz |
SERVER-20520 Include index key in $indexStats return documents
Diffstat (limited to 'src/mongo/db/collection_index_usage_tracker.cpp')
-rw-r--r-- | src/mongo/db/collection_index_usage_tracker.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/collection_index_usage_tracker.cpp b/src/mongo/db/collection_index_usage_tracker.cpp index 10894bcfe6e..9b1d0e17b22 100644 --- a/src/mongo/db/collection_index_usage_tracker.cpp +++ b/src/mongo/db/collection_index_usage_tracker.cpp @@ -49,12 +49,12 @@ void CollectionIndexUsageTracker::recordIndexAccess(StringData indexName) { _indexUsageMap[indexName].accesses.fetchAndAdd(1); } -void CollectionIndexUsageTracker::registerIndex(StringData indexName) { +void CollectionIndexUsageTracker::registerIndex(StringData indexName, const BSONObj& indexKey) { invariant(!indexName.empty()); dassert(_indexUsageMap.find(indexName) == _indexUsageMap.end()); // Create map entry. - _indexUsageMap[indexName] = IndexUsageStats(_clockSource->now()); + _indexUsageMap[indexName] = IndexUsageStats(_clockSource->now(), indexKey); } void CollectionIndexUsageTracker::unregisterIndex(StringData indexName) { |