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/catalog/index_consistency.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/catalog/index_consistency.cpp')
-rw-r--r-- | src/mongo/db/catalog/index_consistency.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/catalog/index_consistency.cpp b/src/mongo/db/catalog/index_consistency.cpp index 78a6e39d0f6..e4e0169ea91 100644 --- a/src/mongo/db/catalog/index_consistency.cpp +++ b/src/mongo/db/catalog/index_consistency.cpp @@ -75,12 +75,13 @@ IndexConsistency::IndexConsistency(OperationContext* opCtx, Milliseconds(internalQueryExecYieldPeriodMS.load())) { IndexCatalog* indexCatalog = _collection->getIndexCatalog(); - IndexCatalog::IndexIterator indexIterator = indexCatalog->getIndexIterator(_opCtx, false); + std::unique_ptr<IndexCatalog::IndexIterator> indexIterator = + indexCatalog->getIndexIterator(_opCtx, false); int indexNumber = 0; - while (indexIterator.more()) { + while (indexIterator->more()) { - const IndexDescriptor* descriptor = indexIterator.next(); + const IndexDescriptor* descriptor = indexIterator->next()->descriptor(); std::string indexNs = descriptor->indexNamespace(); _indexNumber[descriptor->indexNamespace()] = indexNumber; |