summaryrefslogtreecommitdiff
path: root/src/mongo/db/stats/storage_stats.cpp
diff options
context:
space:
mode:
authorDaniel Gottlieb <daniel.gottlieb@mongodb.com>2018-11-12 16:21:17 -0500
committerDaniel Gottlieb <daniel.gottlieb@mongodb.com>2018-11-12 22:18:53 -0500
commita5ce10b0982c7a0378ba92f1c7d3e02d49d0b18a (patch)
tree6113b3c963340471b4ab926d57d94b25077b31dc /src/mongo/db/stats/storage_stats.cpp
parent1a6ca6d1399d56656e3edd0f92fdc494cf491178 (diff)
downloadmongo-a5ce10b0982c7a0378ba92f1c7d3e02d49d0b18a.tar.gz
SERVER-37263: Write updates to background building indexes into a temp table.
- IndexIterator returns IndexCatalogEntry* - Split out ready from building indexes in the IndexCatalog.
Diffstat (limited to 'src/mongo/db/stats/storage_stats.cpp')
-rw-r--r--src/mongo/db/stats/storage_stats.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/db/stats/storage_stats.cpp b/src/mongo/db/stats/storage_stats.cpp
index 92f1054eaae..45db0f8439c 100644
--- a/src/mongo/db/stats/storage_stats.cpp
+++ b/src/mongo/db/stats/storage_stats.cpp
@@ -91,10 +91,11 @@ Status appendCollectionStorageStats(OperationContext* opCtx,
BSONObjBuilder indexDetails;
- IndexCatalog::IndexIterator i = indexCatalog->getIndexIterator(opCtx, false);
- while (i.more()) {
- const IndexDescriptor* descriptor = i.next();
- IndexAccessMethod* iam = indexCatalog->getIndex(descriptor);
+ std::unique_ptr<IndexCatalog::IndexIterator> it = indexCatalog->getIndexIterator(opCtx, false);
+ while (it->more()) {
+ IndexCatalogEntry* entry = it->next();
+ IndexDescriptor* descriptor = entry->descriptor();
+ IndexAccessMethod* iam = entry->accessMethod();
invariant(iam);
BSONObjBuilder bob;