diff options
author | David Storch <david.storch@mongodb.com> | 2020-08-25 18:34:54 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-31 21:53:09 +0000 |
commit | c70016c56f4f34ba09f4975fbf5bb3ac5129b5f7 (patch) | |
tree | c68f8e2c539246ef00a9abc4dfee16e667024dac /src/mongo/db/ttl.cpp | |
parent | 5360e4bd5724440676017d17f6878852753e4bac (diff) | |
download | mongo-c70016c56f4f34ba09f4975fbf5bb3ac5129b5f7.tar.gz |
SERVER-48477 move CRUD interface into PlanExecutor
This allows classic PlanStages to be removed from the
PlanExecutor interface. It also positions the code base well
for adding SBE support for all of the CRUD commands.
Diffstat (limited to 'src/mongo/db/ttl.cpp')
-rw-r--r-- | src/mongo/db/ttl.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mongo/db/ttl.cpp b/src/mongo/db/ttl.cpp index 126b9dcd0d3..f99a991da20 100644 --- a/src/mongo/db/ttl.cpp +++ b/src/mongo/db/ttl.cpp @@ -385,7 +385,9 @@ private: direction); try { - exec->executePlan(); + const auto numDeleted = exec->executeDelete(); + ttlDeletedDocuments.increment(numDeleted); + LOGV2_DEBUG(22536, 1, "deleted: {numDeleted}", "numDeleted"_attr = numDeleted); } catch (const ExceptionFor<ErrorCodes::QueryPlanKilled>&) { // It is expected that a collection drop can kill a query plan while the TTL monitor is // deleting an old document, so ignore this error. @@ -398,10 +400,6 @@ private: "error"_attr = redact(exception.toStatus())); return; } - - const long long numDeleted = DeleteStage::getNumDeleted(*exec); - ttlDeletedDocuments.increment(numDeleted); - LOGV2_DEBUG(22536, 1, "deleted: {numDeleted}", "numDeleted"_attr = numDeleted); } // Protects the state below. |