summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/rollback_impl.cpp
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2020-08-13 07:15:56 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-13 11:29:06 +0000
commit39794a19f5e0d24260eea783db1312bd69077324 (patch)
treecfecf27e140e68b55faadbf684a9f078eb8be898 /src/mongo/db/repl/rollback_impl.cpp
parent8ee28b24e37d42511f3e81c4e6283d1535d557a5 (diff)
downloadmongo-39794a19f5e0d24260eea783db1312bd69077324.tar.gz
SERVER-50105 check return value from IndexBuildsCoordinator::abortIndexBuildByBuildUUID()
Failing to abort an index build is not an error in these cases but will be logged for informational purposes. The only functional change is in the code for stopping index builds before rollback where rollback will not attempt to restart the index build that we failed to abort.
Diffstat (limited to 'src/mongo/db/repl/rollback_impl.cpp')
-rw-r--r--src/mongo/db/repl/rollback_impl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/repl/rollback_impl.cpp b/src/mongo/db/repl/rollback_impl.cpp
index 753802916cc..0098b05767e 100644
--- a/src/mongo/db/repl/rollback_impl.cpp
+++ b/src/mongo/db/repl/rollback_impl.cpp
@@ -343,7 +343,8 @@ void RollbackImpl::_stopAndWaitForIndexBuilds(OperationContext* opCtx) {
invariant(opCtx);
// Aborts all active, two-phase index builds.
- IndexBuildsCoordinator::get(opCtx)->stopIndexBuildsForRollback(opCtx);
+ MONGO_COMPILER_VARIABLE_UNUSED auto stoppedIndexBuilds =
+ IndexBuildsCoordinator::get(opCtx)->stopIndexBuildsForRollback(opCtx);
// Get a list of all databases.
StorageEngine* storageEngine = opCtx->getServiceContext()->getStorageEngine();