summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/mr.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/commands/mr.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/commands/mr.cpp')
-rw-r--r--src/mongo/db/commands/mr.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/commands/mr.cpp b/src/mongo/db/commands/mr.cpp
index 9b039f98e96..3d529332bbc 100644
--- a/src/mongo/db/commands/mr.cpp
+++ b/src/mongo/db/commands/mr.cpp
@@ -530,11 +530,11 @@ void State::prepTempCollection() {
if (finalColl) {
finalOptions = finalColl->getCatalogEntry()->getCollectionOptions(_opCtx);
- IndexCatalog::IndexIterator ii =
+ std::unique_ptr<IndexCatalog::IndexIterator> ii =
finalColl->getIndexCatalog()->getIndexIterator(_opCtx, true);
// Iterate over finalColl's indexes.
- while (ii.more()) {
- IndexDescriptor* currIndex = ii.next();
+ while (ii->more()) {
+ IndexDescriptor* currIndex = ii->next()->descriptor();
BSONObjBuilder b;
b.append("ns", _config.tempNamespace.ns());
@@ -1114,11 +1114,11 @@ void State::finalReduce(OperationContext* opCtx, CurOp* curOp, ProgressMeterHold
assertCollectionNotNull(_config.incLong, autoIncColl);
bool foundIndex = false;
- IndexCatalog::IndexIterator ii =
+ std::unique_ptr<IndexCatalog::IndexIterator> ii =
autoIncColl.getCollection()->getIndexCatalog()->getIndexIterator(_opCtx, true);
// Iterate over incColl's indexes.
- while (ii.more()) {
- IndexDescriptor* currIndex = ii.next();
+ while (ii->more()) {
+ IndexDescriptor* currIndex = ii->next()->descriptor();
BSONObj x = currIndex->infoObj();
if (sortKey.woCompare(x["key"].embeddedObject()) == 0) {
foundIndex = true;