summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2016-09-16 16:25:47 -0400
committerBenety Goh <benety@mongodb.com>2016-09-20 10:42:44 -0400
commit0e0e3c8c69ed513a793c6d47a91b1bae932fe50b (patch)
treed5e357f39e71e1bb0d39b9e10893c5fd4a2580fa /src/mongo/db
parent79217aff3a1b4be7ec325a802d8601b489efce97 (diff)
downloadmongo-0e0e3c8c69ed513a793c6d47a91b1bae932fe50b.tar.gz
SERVER-25268 create default initial sync oplog buffer with cache for front and back of buffer
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/SConscript1
-rw-r--r--src/mongo/db/repl/replication_coordinator_external_state_impl.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript
index 8dad1e9d8a5..075dddeff17 100644
--- a/src/mongo/db/SConscript
+++ b/src/mongo/db/SConscript
@@ -702,6 +702,7 @@ serveronlyLibdeps = [
"repl/bgsync",
"repl/oplog_buffer_collection",
"repl/oplog_buffer_blocking_queue",
+ "repl/oplog_buffer_proxy",
"repl/repl_coordinator_global",
"repl/repl_coordinator_impl",
"repl/repl_settings",
diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
index de655b863da..a0f0104a5f7 100644
--- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
@@ -57,6 +57,7 @@
#include "mongo/db/repl/oplog.h"
#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/repl_settings.h"
#include "mongo/db/repl/replication_coordinator_global.h"
#include "mongo/db/repl/rs_initialsync.h"
@@ -834,7 +835,8 @@ void ReplicationCoordinatorExternalStateImpl::multiInitialSyncApply(
std::unique_ptr<OplogBuffer> ReplicationCoordinatorExternalStateImpl::makeInitialSyncOplogBuffer(
OperationContext* txn) const {
if (initialSyncOplogBuffer == kCollectionOplogBufferName) {
- return stdx::make_unique<OplogBufferCollection>(StorageInterface::get(txn));
+ return stdx::make_unique<OplogBufferProxy>(
+ stdx::make_unique<OplogBufferCollection>(StorageInterface::get(txn)));
} else {
return stdx::make_unique<OplogBufferBlockingQueue>();
}