diff options
author | Xin Hao Zhang <xinhao.zhang@10gen.com> | 2019-05-30 16:17:56 -0400 |
---|---|---|
committer | Xin Hao Zhang <xinhao.zhang@10gen.com> | 2019-05-31 10:59:41 -0400 |
commit | 933c6ad19c3f19a964c74a5174cbcf11cde0a66e (patch) | |
tree | c39b0f83ff7843219c40469b61055e64e5486b6f | |
parent | 182f15f37344118b33419c05820c2753d06191ed (diff) | |
download | mongo-933c6ad19c3f19a964c74a5174cbcf11cde0a66e.tar.gz |
SERVER-23831 Remove fastmodinsert
-rw-r--r-- | src/mongo/db/curop.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/curop.h | 3 | ||||
-rw-r--r-- | src/mongo/db/exec/plan_stats.h | 8 | ||||
-rw-r--r-- | src/mongo/db/exec/update_stage.cpp | 3 | ||||
-rw-r--r-- | src/mongo/db/exec/update_stage.h | 2 | ||||
-rw-r--r-- | src/mongo/db/query/explain.cpp | 1 |
6 files changed, 2 insertions, 17 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index 42ef17cf216..0047f47f59c 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -676,7 +676,6 @@ string OpDebug::report(Client* client, OPDEBUG_TOSTRING_HELP_OPTIONAL("nModified", additiveMetrics.nModified); OPDEBUG_TOSTRING_HELP_OPTIONAL("ninserted", additiveMetrics.ninserted); OPDEBUG_TOSTRING_HELP_OPTIONAL("ndeleted", additiveMetrics.ndeleted); - OPDEBUG_TOSTRING_HELP_BOOL(fastmodinsert); OPDEBUG_TOSTRING_HELP_BOOL(upsert); OPDEBUG_TOSTRING_HELP_BOOL(cursorExhausted); @@ -779,7 +778,6 @@ void OpDebug::append(const CurOp& curop, OPDEBUG_APPEND_OPTIONAL("nModified", additiveMetrics.nModified); OPDEBUG_APPEND_OPTIONAL("ninserted", additiveMetrics.ninserted); OPDEBUG_APPEND_OPTIONAL("ndeleted", additiveMetrics.ndeleted); - OPDEBUG_APPEND_BOOL(fastmodinsert); OPDEBUG_APPEND_BOOL(upsert); OPDEBUG_APPEND_BOOL(cursorExhausted); diff --git a/src/mongo/db/curop.h b/src/mongo/db/curop.h index 1c537770907..7444316ad33 100644 --- a/src/mongo/db/curop.h +++ b/src/mongo/db/curop.h @@ -205,8 +205,7 @@ public: // True if a replan was triggered during the execution of this operation. bool replanned{false}; - bool fastmodinsert{false}; // upsert of an $operation. builds a default object - bool upsert{false}; // true if the update actually did an insert + bool upsert{false}; // true if the update actually did an insert bool cursorExhausted{ false}; // true if the cursor has been closed at end a find/getMore operation diff --git a/src/mongo/db/exec/plan_stats.h b/src/mongo/db/exec/plan_stats.h index 527adc44bca..35f4c334eb2 100644 --- a/src/mongo/db/exec/plan_stats.h +++ b/src/mongo/db/exec/plan_stats.h @@ -559,8 +559,7 @@ struct NearStats : public SpecificStats { }; struct UpdateStats : public SpecificStats { - UpdateStats() - : nMatched(0), nModified(0), isModUpdate(false), fastmodinsert(false), inserted(false) {} + UpdateStats() : nMatched(0), nModified(0), isModUpdate(false), inserted(false) {} SpecificStats* clone() const final { return new UpdateStats(*this); @@ -575,11 +574,6 @@ struct UpdateStats : public SpecificStats { // True iff this is a $mod update. bool isModUpdate; - // A 'fastmodinsert' is an insert resulting from an {upsert: true} update - // which is a doc-replacement style update. It's "fast" because we don't need - // to compute the document to insert based on the modifiers. - bool fastmodinsert; - // Is this an {upsert: true} update that did an insert? bool inserted; diff --git a/src/mongo/db/exec/update_stage.cpp b/src/mongo/db/exec/update_stage.cpp index da467a3b407..d77676122a8 100644 --- a/src/mongo/db/exec/update_stage.cpp +++ b/src/mongo/db/exec/update_stage.cpp @@ -435,8 +435,6 @@ BSONObj UpdateStage::applyUpdateOpsForInsert(OperationContext* opCtx, } requiredPaths.keepShortest(&idFieldRef); uassertStatusOK(driver->populateDocumentWithQueryFields(*cq, requiredPaths, *doc)); - if (driver->type() == UpdateDriver::UpdateType::kReplacement) - stats->fastmodinsert = true; } else { fassert(17354, CanonicalQuery::isSimpleIdQuery(query)); BSONElement idElt = query[idFieldName]; @@ -921,7 +919,6 @@ void UpdateStage::recordUpdateStatsInOpDebug(const UpdateStats* updateStats, OpD opDebug->additiveMetrics.nMatched = updateStats->nMatched; opDebug->additiveMetrics.nModified = updateStats->nModified; opDebug->upsert = updateStats->inserted; - opDebug->fastmodinsert = updateStats->fastmodinsert; } UpdateResult UpdateStage::makeUpdateResult(const UpdateStats* updateStats) { diff --git a/src/mongo/db/exec/update_stage.h b/src/mongo/db/exec/update_stage.h index 363f63d808a..93936166544 100644 --- a/src/mongo/db/exec/update_stage.h +++ b/src/mongo/db/exec/update_stage.h @@ -132,8 +132,6 @@ public: * Set 'isInternalRequest' to true if the upsert was issued by the replication or * sharding systems. * - * Fills out whether or not this is a fastmodinsert in 'stats'. - * * Returns the document to insert. */ static BSONObj applyUpdateOpsForInsert(OperationContext* opCtx, diff --git a/src/mongo/db/query/explain.cpp b/src/mongo/db/query/explain.cpp index 8eecde1fad1..977b7fdb1a1 100644 --- a/src/mongo/db/query/explain.cpp +++ b/src/mongo/db/query/explain.cpp @@ -577,7 +577,6 @@ void Explain::statsToBSON(const PlanStageStats& stats, bob->appendNumber("nMatched", spec->nMatched); bob->appendNumber("nWouldModify", spec->nModified); bob->appendBool("wouldInsert", spec->inserted); - bob->appendBool("fastmodinsert", spec->fastmodinsert); } } |