summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/multi_index_block_impl.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2018-10-26 17:21:58 -0400
committerDavid Storch <david.storch@10gen.com>2018-10-31 17:26:35 -0400
commitd6c618fc94ebdfdba5d270e396a084290a54d360 (patch)
tree81f42ec3ebe8522ebbca4e95a6c1615fccfbdb26 /src/mongo/db/catalog/multi_index_block_impl.cpp
parent5180b48eedec5e57e7f12f734d173184bbff2af7 (diff)
downloadmongo-d6c618fc94ebdfdba5d270e396a084290a54d360.tar.gz
SERVER-37444 Added RequiresCollectionStage and use for COLLSCAN.
This is a pure refactor with no user-facing changes. It is the first step in making PlanExecutors check their own validity during yield recovery, rather than requiring the invalidating actor to issue a kill notification.
Diffstat (limited to 'src/mongo/db/catalog/multi_index_block_impl.cpp')
-rw-r--r--src/mongo/db/catalog/multi_index_block_impl.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mongo/db/catalog/multi_index_block_impl.cpp b/src/mongo/db/catalog/multi_index_block_impl.cpp
index 87a851f9c1d..32be5a0e4a7 100644
--- a/src/mongo/db/catalog/multi_index_block_impl.cpp
+++ b/src/mongo/db/catalog/multi_index_block_impl.cpp
@@ -400,9 +400,10 @@ Status MultiIndexBlockImpl::insertAllDocumentsInCollection() {
}
wunit.commit();
if (_buildInBackground) {
- auto restoreStatus = exec->restoreState(); // Handles any WCEs internally.
- if (!restoreStatus.isOK()) {
- return restoreStatus;
+ try {
+ exec->restoreState(); // Handles any WCEs internally.
+ } catch (...) {
+ return exceptionToStatus();
}
}
@@ -422,9 +423,10 @@ Status MultiIndexBlockImpl::insertAllDocumentsInCollection() {
// abandonSnapshot.
exec->saveState();
_opCtx->recoveryUnit()->abandonSnapshot();
- auto restoreStatus = exec->restoreState(); // Handles any WCEs internally.
- if (!restoreStatus.isOK()) {
- return restoreStatus;
+ try {
+ exec->restoreState(); // Handles any WCEs internally.
+ } catch (...) {
+ return exceptionToStatus();
}
}
}