summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/data_replicator_external_state_impl.cpp
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2018-05-02 10:52:08 -0400
committerBenety Goh <benety@mongodb.com>2018-05-02 10:52:08 -0400
commited967e1216becd9195a77cbce5bd0f9a40a54d5b (patch)
tree55be8e751d90ce09ffdb85567985b9e5e99d422a /src/mongo/db/repl/data_replicator_external_state_impl.cpp
parent17e5914811e5cc9f8dfe5d46b0771abfead6c9c3 (diff)
downloadmongo-ed967e1216becd9195a77cbce5bd0f9a40a54d5b.tar.gz
SERVER-32334 OplogApplier and SyncTail accept ReplicationConsistencyMarkers and StorageInterface at construction
Diffstat (limited to 'src/mongo/db/repl/data_replicator_external_state_impl.cpp')
-rw-r--r--src/mongo/db/repl/data_replicator_external_state_impl.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mongo/db/repl/data_replicator_external_state_impl.cpp b/src/mongo/db/repl/data_replicator_external_state_impl.cpp
index ba3642a1dff..caa8ed1f711 100644
--- a/src/mongo/db/repl/data_replicator_external_state_impl.cpp
+++ b/src/mongo/db/repl/data_replicator_external_state_impl.cpp
@@ -36,8 +36,10 @@
#include "mongo/db/repl/oplog_buffer_blocking_queue.h"
#include "mongo/db/repl/oplog_buffer_collection.h"
#include "mongo/db/repl/oplog_buffer_proxy.h"
+#include "mongo/db/repl/replication_consistency_markers.h"
#include "mongo/db/repl/replication_coordinator.h"
#include "mongo/db/repl/replication_coordinator_external_state.h"
+#include "mongo/db/repl/replication_process.h"
#include "mongo/db/repl/storage_interface.h"
#include "mongo/db/repl/sync_tail.h"
#include "mongo/db/server_parameters.h"
@@ -154,7 +156,11 @@ StatusWith<OpTime> DataReplicatorExternalStateImpl::_multiApply(OperationContext
OplogApplier::Observer* observer,
const HostAndPort& source,
ThreadPool* writerPool) {
- SyncTail syncTail(observer, repl::multiInitialSyncApply, writerPool);
+ auto replicationProcess = ReplicationProcess::get(opCtx);
+ auto consistencyMarkers = replicationProcess->getConsistencyMarkers();
+ auto storageInterface = StorageInterface::get(opCtx);
+ SyncTail syncTail(
+ observer, consistencyMarkers, storageInterface, repl::multiInitialSyncApply, writerPool);
syncTail.setHostname(source.toString());
return syncTail.multiApply(opCtx, std::move(ops));
}