diff options
author | Daniel Gottlieb <daniel.gottlieb@mongodb.com> | 2018-11-12 16:21:17 -0500 |
---|---|---|
committer | Daniel Gottlieb <daniel.gottlieb@mongodb.com> | 2018-11-12 22:18:53 -0500 |
commit | a5ce10b0982c7a0378ba92f1c7d3e02d49d0b18a (patch) | |
tree | 6113b3c963340471b4ab926d57d94b25077b31dc /src/mongo/db/stats/storage_stats.cpp | |
parent | 1a6ca6d1399d56656e3edd0f92fdc494cf491178 (diff) | |
download | mongo-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.cpp | 9 |
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; |