The order of writing to oplog and replaying to db in secondary node

23 views
Skip to first unread message

Jing Liu

unread,
Apr 7, 2017, 8:13:55 AM4/7/17
to mongodb-dev
Hi,

I'm wondering the order of writing to oplog and replaying in secondary node. When I read the code, the comment on top of multiApply() says that "// Applies a batch of oplog entries, by using a set of threads to apply the operations and then writes the oplog entries to the local oplog." Is that really the case? From the source code, I found writeToOplog called earlier than applyOps(). 

Thanks very much.

Judah Schvimer

unread,
Apr 7, 2017, 11:19:43 AM4/7/17
to mongodb-dev
Hi!

Thank you for bringing this to our attention! You're right. The comment was not updated with the relevant code. I have filed https://jira.mongodb.org/browse/SERVER-28674 to fix the mistake.

Best,
Judah
Reply all
Reply to author
Forward
0 new messages