Skip to content

Commit db62658

Browse files
committed
SERVER-8070 Notify primary after each batch, not after each op
1 parent 3f829e9 commit db62658

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/mongo/db/oplog.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ namespace mongo {
9898
theReplSet->lastOpTimeWritten = ts;
9999
theReplSet->lastH = h;
100100
ctx.getClient()->setLastOp( ts );
101-
102-
replset::BackgroundSync::notify();
103101
}
104102
}
105103
}

src/mongo/db/repl/rs_initialsync.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,10 @@ namespace mongo {
450450
cx.ctx().db()->flushFiles(true);
451451
}
452452

453+
// If we just cloned & there were no ops applied, we still want the primary to know where
454+
// we're up to
455+
replset::BackgroundSync::notify();
456+
453457
changeState(MemberState::RS_RECOVERING);
454458
sethbmsg("initial sync done",0);
455459
}

0 commit comments

Comments
 (0)