summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/collection_scan.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2018-08-14 12:13:20 -0400
committerDavid Storch <david.storch@10gen.com>2018-08-29 09:32:45 -0400
commitf55559368fe6a51689ffc3c08bab4434cb1b2b99 (patch)
tree69924e0deea641a1618b1c31dd1d5f0faf645b2f /src/mongo/db/exec/collection_scan.cpp
parentba01c62b56ad109a17c11ed3ab609e0453eadf59 (diff)
downloadmongo-f55559368fe6a51689ffc3c08bab4434cb1b2b99.tar.gz
SERVER-16857 Delete MMAPv1 diskloc invalidations.
- Removes of PlanStage::invalidate(). - Removes RecordCursor::invalidate() from the storage API. - Removes CursorManager::invalidateDocument().
Diffstat (limited to 'src/mongo/db/exec/collection_scan.cpp')
-rw-r--r--src/mongo/db/exec/collection_scan.cpp35
1 files changed, 6 insertions, 29 deletions
diff --git a/src/mongo/db/exec/collection_scan.cpp b/src/mongo/db/exec/collection_scan.cpp
index 162caf4cf3e..e2c51ea7304 100644
--- a/src/mongo/db/exec/collection_scan.cpp
+++ b/src/mongo/db/exec/collection_scan.cpp
@@ -121,12 +121,12 @@ PlanStage::StageState CollectionScan::doWork(WorkingSetID* out) {
if (!_lastSeenId.isNull()) {
invariant(_params.tailable);
- // Seek to where we were last time. If it no longer exists, mark us as dead
- // since we want to signal an error rather than silently dropping data from the
- // stream. This is related to the _lastSeenId handling in invalidate. Note that
- // we want to return the record *after* this one since we have already returned
- // this one. This is only possible in the tailing case because that is the only
- // time we'd need to create a cursor after already getting a record out of it.
+ // Seek to where we were last time. If it no longer exists, mark us as dead since we
+ // want to signal an error rather than silently dropping data from the stream.
+ //
+ // Note that we want to return the record *after* this one since we have already
+ // returned this one. This is only possible in the tailing case because that is the
+ // only time we'd need to create a cursor after already getting a record out of it.
if (!_cursor->seekExact(_lastSeenId)) {
_isDead = true;
Status status(ErrorCodes::CappedPositionLost,
@@ -234,29 +234,6 @@ bool CollectionScan::isEOF() {
return _commonStats.isEOF || _isDead;
}
-void CollectionScan::doInvalidate(OperationContext* opCtx,
- const RecordId& id,
- InvalidationType type) {
- // We don't care about mutations since we apply any filters to the result when we (possibly)
- // return it.
- if (INVALIDATION_DELETION != type) {
- return;
- }
-
- // If we're here, 'id' is being deleted.
-
- // Deletions can harm the underlying RecordCursor so we must pass them down.
- if (_cursor) {
- _cursor->invalidate(opCtx, id);
- }
-
- if (_params.tailable && id == _lastSeenId) {
- // This means that deletes have caught up to the reader. We want to error in this case
- // so readers don't miss potentially important data.
- _isDead = true;
- }
-}
-
void CollectionScan::doSaveState() {
if (_cursor) {
_cursor->save();