Data Processing

Processing MongoDB Oplog

Rebuilding MongoDB documents from Oplog

Atharva Inamdar
Towards Data Science
4 min readFeb 12, 2019

--

In a previous post, I covered what the MongoDB oplog is and its semantics. In this post, I will look at how to process it to get the new state of documents.

Recap

First, let’s remind ourselves of the data manipulation operations: Insert, Update & Delete. For Inserts and Deletes, only the o field exists with either the full document or just the _id being deleted. For Updates, o field contains the updates as $set and…

--

--