diff options
Diffstat (limited to 'src/mongo/db/exec')
-rw-r--r-- | src/mongo/db/exec/collection_scan.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/exec/count_scan.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/exec/delete.cpp | 8 | ||||
-rw-r--r-- | src/mongo/db/exec/distinct_scan.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/exec/fetch.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/exec/idhack.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/exec/index_scan.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/exec/multi_iterator.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/exec/oplogstart.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/exec/text_or.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/exec/update.cpp | 8 |
11 files changed, 20 insertions, 20 deletions
diff --git a/src/mongo/db/exec/collection_scan.cpp b/src/mongo/db/exec/collection_scan.cpp index 987f7c28513..c05dde68cea 100644 --- a/src/mongo/db/exec/collection_scan.cpp +++ b/src/mongo/db/exec/collection_scan.cpp @@ -147,7 +147,7 @@ PlanStage::StageState CollectionScan::doWork(WorkingSetID* out) { record = _cursor->next(); } - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { // Leave us in a state to try again next time. if (needToMakeCursor) _cursor.reset(); diff --git a/src/mongo/db/exec/count_scan.cpp b/src/mongo/db/exec/count_scan.cpp index 0693b310b02..8745ec48f41 100644 --- a/src/mongo/db/exec/count_scan.cpp +++ b/src/mongo/db/exec/count_scan.cpp @@ -114,7 +114,7 @@ PlanStage::StageState CountScan::doWork(WorkingSetID* out) { } else { entry = _cursor->next(kWantLoc); } - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { if (needInit) { // Release our cursor and try again next time. _cursor.reset(); diff --git a/src/mongo/db/exec/delete.cpp b/src/mongo/db/exec/delete.cpp index 059f66a5cdb..6262279c054 100644 --- a/src/mongo/db/exec/delete.cpp +++ b/src/mongo/db/exec/delete.cpp @@ -177,7 +177,7 @@ PlanStage::StageState DeleteStage::doWork(WorkingSetID* out) { try { docStillMatches = write_stage_common::ensureStillMatches( _collection, getOpCtx(), _ws, id, _params.canonicalQuery); - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { // There was a problem trying to detect if the document still exists, so retry. memberFreer.Dismiss(); return prepareToRetryWSM(id, out); @@ -207,7 +207,7 @@ PlanStage::StageState DeleteStage::doWork(WorkingSetID* out) { WorkingSetCommon::prepareForSnapshotChange(_ws); try { child()->saveState(); - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { std::terminate(); } @@ -218,7 +218,7 @@ PlanStage::StageState DeleteStage::doWork(WorkingSetID* out) { _collection->deleteDocument( getOpCtx(), _params.stmtId, recordId, _params.opDebug, _params.fromMigrate); wunit.commit(); - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { memberFreer.Dismiss(); // Keep this member around so we can retry deleting it. return prepareToRetryWSM(id, out); } @@ -237,7 +237,7 @@ PlanStage::StageState DeleteStage::doWork(WorkingSetID* out) { // outside of the WriteUnitOfWork. try { child()->restoreState(); - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { // Note we don't need to retry anything in this case since the delete already was committed. // However, we still need to return the deleted document (if it was requested). if (_params.returnDeleted) { diff --git a/src/mongo/db/exec/distinct_scan.cpp b/src/mongo/db/exec/distinct_scan.cpp index 380bcf3474b..2b37e2ef38b 100644 --- a/src/mongo/db/exec/distinct_scan.cpp +++ b/src/mongo/db/exec/distinct_scan.cpp @@ -81,7 +81,7 @@ PlanStage::StageState DistinctScan::doWork(WorkingSetID* out) { if (!_cursor) _cursor = _iam->newCursor(getOpCtx(), _params.direction == 1); kv = _cursor->seek(_seekPoint); - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { *out = WorkingSet::INVALID_ID; return PlanStage::NEED_YIELD; } diff --git a/src/mongo/db/exec/fetch.cpp b/src/mongo/db/exec/fetch.cpp index d42a86a8af0..f7d84305966 100644 --- a/src/mongo/db/exec/fetch.cpp +++ b/src/mongo/db/exec/fetch.cpp @@ -120,7 +120,7 @@ PlanStage::StageState FetchStage::doWork(WorkingSetID* out) { _ws->free(id); return NEED_TIME; } - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { // Ensure that the BSONObj underlying the WorkingSetMember is owned because it may // be freed when we yield. member->makeObjOwnedIfNeeded(); diff --git a/src/mongo/db/exec/idhack.cpp b/src/mongo/db/exec/idhack.cpp index db24744f898..b0d88418572 100644 --- a/src/mongo/db/exec/idhack.cpp +++ b/src/mongo/db/exec/idhack.cpp @@ -160,7 +160,7 @@ PlanStage::StageState IDHackStage::doWork(WorkingSetID* out) { } return advance(id, member, out); - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { // Restart at the beginning on retry. _recordCursor.reset(); if (id != WorkingSet::INVALID_ID) diff --git a/src/mongo/db/exec/index_scan.cpp b/src/mongo/db/exec/index_scan.cpp index 50e4ff56962..793f1a1ae09 100644 --- a/src/mongo/db/exec/index_scan.cpp +++ b/src/mongo/db/exec/index_scan.cpp @@ -146,7 +146,7 @@ PlanStage::StageState IndexScan::doWork(WorkingSetID* out) { case HIT_END: return PlanStage::IS_EOF; } - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { *out = WorkingSet::INVALID_ID; return PlanStage::NEED_YIELD; } diff --git a/src/mongo/db/exec/multi_iterator.cpp b/src/mongo/db/exec/multi_iterator.cpp index 24b8d375a67..69d83775543 100644 --- a/src/mongo/db/exec/multi_iterator.cpp +++ b/src/mongo/db/exec/multi_iterator.cpp @@ -78,7 +78,7 @@ PlanStage::StageState MultiIteratorStage::doWork(WorkingSetID* out) { break; _iterators.pop_back(); } - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { // If _advance throws a WCE we shouldn't have moved. invariant(!_iterators.empty()); *out = WorkingSet::INVALID_ID; diff --git a/src/mongo/db/exec/oplogstart.cpp b/src/mongo/db/exec/oplogstart.cpp index 8a8480ce136..49e81a0630f 100644 --- a/src/mongo/db/exec/oplogstart.cpp +++ b/src/mongo/db/exec/oplogstart.cpp @@ -80,7 +80,7 @@ PlanStage::StageState OplogStart::doWork(WorkingSetID* out) { try { // If this throws WCE, it leave us in a state were the next call to work will retry. switchToExtentHopping(); - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { _subIterators.clear(); *out = WorkingSet::INVALID_ID; return NEED_YIELD; @@ -113,7 +113,7 @@ PlanStage::StageState OplogStart::workExtentHopping(WorkingSetID* out) { return PlanStage::ADVANCED; } } - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { *out = WorkingSet::INVALID_ID; return PlanStage::NEED_YIELD; } diff --git a/src/mongo/db/exec/text_or.cpp b/src/mongo/db/exec/text_or.cpp index 5666feea046..bea23d39e34 100644 --- a/src/mongo/db/exec/text_or.cpp +++ b/src/mongo/db/exec/text_or.cpp @@ -165,7 +165,7 @@ PlanStage::StageState TextOrStage::initStage(WorkingSetID* out) { _recordCursor = _index->getCollection()->getCursor(getOpCtx()); _internalState = State::kReadingTerms; return PlanStage::NEED_TIME; - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { invariant(_internalState == State::kInit); _recordCursor.reset(); return PlanStage::NEED_YIELD; @@ -355,7 +355,7 @@ PlanStage::StageState TextOrStage::addTerm(WorkingSetID wsid, WorkingSetID* out) wsid, _recordCursor); shouldKeep = _filter->matches(&tdoc); - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { // Ensure that the BSONObj underlying the WorkingSetMember is owned because it may // be freed when we yield. wsm->makeObjOwnedIfNeeded(); @@ -380,7 +380,7 @@ PlanStage::StageState TextOrStage::addTerm(WorkingSetID wsid, WorkingSetID* out) try { shouldKeep = WorkingSetCommon::fetch(getOpCtx(), _ws, wsid, _recordCursor); ++_specificStats.fetches; - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { wsm->makeObjOwnedIfNeeded(); _idRetrying = wsid; *out = WorkingSet::INVALID_ID; diff --git a/src/mongo/db/exec/update.cpp b/src/mongo/db/exec/update.cpp index 6b6af6f01ab..7e8c279c7d1 100644 --- a/src/mongo/db/exec/update.cpp +++ b/src/mongo/db/exec/update.cpp @@ -612,7 +612,7 @@ PlanStage::StageState UpdateStage::doWork(WorkingSetID* out) { try { docStillMatches = write_stage_common::ensureStillMatches( _collection, getOpCtx(), _ws, id, _params.canonicalQuery); - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { // There was a problem trying to detect if the document still exists, so retry. memberFreer.Dismiss(); return prepareToRetryWSM(id, out); @@ -635,7 +635,7 @@ PlanStage::StageState UpdateStage::doWork(WorkingSetID* out) { WorkingSetCommon::prepareForSnapshotChange(_ws); try { child()->saveState(); - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { std::terminate(); } @@ -649,7 +649,7 @@ PlanStage::StageState UpdateStage::doWork(WorkingSetID* out) { try { // Do the update, get us the new version of the doc. newObj = transformAndUpdate(member->obj, recordId); - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { memberFreer.Dismiss(); // Keep this member around so we can retry updating it. return prepareToRetryWSM(id, out); } @@ -676,7 +676,7 @@ PlanStage::StageState UpdateStage::doWork(WorkingSetID* out) { // state outside of the WritUnitOfWork. try { child()->restoreState(); - } catch (const WriteConflictException& wce) { + } catch (const WriteConflictException&) { // Note we don't need to retry updating anything in this case since the update // already was committed. However, we still need to return the updated document // (if it was requested). |