Docs Menu
Docs Home
/
MongoDB Cluster-to-Cluster Sync
/ /

Oplog Rollover Resilience

On this page

  • Syntax
  • Behavior
  • Learn More

Important

Cluster-to-Cluster Sync Beta Program

This feature is only available in mongosync beta. To learn more, see Cluster-to-Cluster Sync Beta Program.

Starting in mongosync beta 1.8, you can enable Oplog Rollover Resilience (ORR). With ORR, mongosync applies changes made on the source cluster to the destination cluster concurrently with initial sync.

By applying changes earlier in the sync process, mongosync maintains a more recent position in the oplog. For source clusters with a high write rate, ORR significantly lowers the risk of oplog rollover during initial sync and reduces the need to restart the sync.

To enable ORR, use --oplogRolloverResilienceIntervalSeconds and specify the interval, in seconds, in which mongosync checks for eligible change events in the oplog. The default value is -1, which disables ORR.

For example, to start mongosync with the oplogRolloverResilienceIntervalSeconds set to 60 seconds, run the following command:

./bin/mongosync \
--cluster0 "mongodb://localhost:27000" \
--cluster1 "mongodb://localhost:27001" \
--oplogRolloverResilienceIntervalSeconds 60

ORR increases the resilience of mongosync to oplog rollover during initial sync but does not prevent rollover entirely.

You might exceed the oplog window if you:

  • Sync from a high write rate source cluster for an extended period.

  • Pause sync for an extended period.

To increase the size of the oplog on the source cluster, use oplogSizeMB.

Back

Namespace Remapping