summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/sync_tail.cpp
diff options
context:
space:
mode:
authorApollon Oikonomopoulos <apoikos@debian.org>2018-09-04 11:58:07 +0300
committerApollon Oikonomopoulos <apoikos@debian.org>2018-09-04 11:58:07 +0300
commit3896a4a134ae19f25de14727862898cee19aa2e3 (patch)
tree612b3188b82e3ac43407cfc26a1e28b6a7b3e292 /src/mongo/db/repl/sync_tail.cpp
parent2ce39939bd866655e11468aae453992093b18917 (diff)
New upstream version 3.4.16
Diffstat (limited to 'src/mongo/db/repl/sync_tail.cpp')
-rw-r--r--src/mongo/db/repl/sync_tail.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/db/repl/sync_tail.cpp b/src/mongo/db/repl/sync_tail.cpp
index 3f65e3fc6b7..dfd1d564f90 100644
--- a/src/mongo/db/repl/sync_tail.cpp
+++ b/src/mongo/db/repl/sync_tail.cpp
@@ -775,6 +775,11 @@ private:
void SyncTail::oplogApplication(ReplicationCoordinator* replCoord) {
OpQueueBatcher batcher(this);
+ _oplogApplication(replCoord, &batcher);
+}
+
+void SyncTail::_oplogApplication(ReplicationCoordinator* replCoord,
+ OpQueueBatcher* batcher) noexcept {
std::unique_ptr<ApplyBatchFinalizer> finalizer{
getGlobalServiceContext()->getGlobalStorageEngine()->isDurable()
? new ApplyBatchFinalizerForJournal(replCoord)
@@ -800,7 +805,7 @@ void SyncTail::oplogApplication(ReplicationCoordinator* replCoord) {
long long termWhenBufferIsEmpty = replCoord->getTerm();
// Blocks up to a second waiting for a batch to be ready to apply. If one doesn't become
// ready in time, we'll loop again so we can do the above checks periodically.
- OpQueue ops = batcher.getNextBatch(Seconds(1));
+ OpQueue ops = batcher->getNextBatch(Seconds(1));
if (ops.empty()) {
if (ops.mustShutdown()) {
return;