I’m looking for a bit more information on the initial sync architecture with respect to the Oplog and data changes during the data copy phase.
I’m referring to this page; https://docs.mongodb.com/manual/core/replica-set-sync/
If I understand this correctly, while the data copy is happening from the source to the target, any data changes picked up on the source are written to the local database on the target. Once the data copy is complete, the changes in the target local are then executed to ensure the source and target are in sync? This is the behaviour from 3.4 onwards.
The Oplog is 150GB. My thinking is that if we generated 300GB of data changes, they would be synced to the local on target and then replayed once the data copy stage has completed?
I was always under the impression that the data copy phase had to complete before the Oplog records were overwritten. This may have been the behaviour in 3.2 and earlier. Or it could be that I never properly understood this area!
The reason for asking is that I am syncing a very large database. The replication oplog window for this replicaset can vary between 1 and 4 hours - it is a very volatile database in terms of collection’s being created and dropped very frequently.