diff options
author | Benety Goh <benety@mongodb.com> | 2019-10-18 19:31:56 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-18 19:31:56 +0000 |
commit | c00bee5ceaaff758eb01975f58d1c7a09432dea0 (patch) | |
tree | fe71fdc6327813a2c2b3915bf1a1ac92de345f77 /src/mongo/db/repl/bgsync.cpp | |
parent | 4706c3bebf74c942f6ff9cab905027f053fbdc95 (diff) | |
download | mongo-c00bee5ceaaff758eb01975f58d1c7a09432dea0.tar.gz |
SERVER-39484 IndexBuildsCoordinator receives notifications on rollback/step up to primary
This partially restores some of the replication state transition functions removed in
commit adab6702bc9869557c14eb8b0e888c6e854f4593.
Diffstat (limited to 'src/mongo/db/repl/bgsync.cpp')
-rw-r--r-- | src/mongo/db/repl/bgsync.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/repl/bgsync.cpp b/src/mongo/db/repl/bgsync.cpp index 497a0fefca9..39cb42f86f7 100644 --- a/src/mongo/db/repl/bgsync.cpp +++ b/src/mongo/db/repl/bgsync.cpp @@ -45,6 +45,7 @@ #include "mongo/db/concurrency/replication_state_transition_lock_guard.h" #include "mongo/db/concurrency/write_conflict_exception.h" #include "mongo/db/dbhelpers.h" +#include "mongo/db/index_builds_coordinator.h" #include "mongo/db/repl/data_replicator_external_state_impl.h" #include "mongo/db/repl/oplog.h" #include "mongo/db/repl/oplog_interface_local.h" @@ -633,6 +634,8 @@ void BackgroundSync::_runRollback(OperationContext* opCtx, // are visible before potentially truncating the oplog. storageInterface->waitForAllEarlierOplogWritesToBeVisible(opCtx); + IndexBuildsCoordinator::get(opCtx)->onRollback(opCtx); + auto storageEngine = opCtx->getServiceContext()->getStorageEngine(); if (!forceRollbackViaRefetch.load() && storageEngine->supportsRecoverToStableTimestamp()) { log() << "Rollback using 'recoverToStableTimestamp' method."; |