Cannot find oplog entry

The syncreplica –export command can fail when the sending replica’s epoch number matrix does not match its set of oplog entries.

The syncreplica –export command can fail with the following warning message:

Multiutil: Error: 'family' database has exported oplog entries originating 
from replica 'site' through oplog-ID oplog-ID. The next oplog-ID 
to be exported is oplog-ID; it should be oplog-ID. A gap in oplog 
entries may indicate missing oplog entries.
This error occurs when the sending replica’s epoch number matrix does not match its set of oplog entries. For example:
  • Before sending an update from sydney to buenosaires, syncreplica checks the epoch number matrix for sydney. It determines that the last sydney operation sent to buenosaires was 3620.
  • Oplog scrubbing in the sydney database has removed some of the operations that follow 3620. The earliest sydney operation remaining in the oplog is 5755.

This discrepancy may be an expected condition. For example, when you change the synchronization pattern for a family, replicas that have not communicated with each other in the past start exchanging update packets. Synchronizing two replicas (syncreplica –export followed by syncreplica –import) updates epoch number matrix rows for the sending and receiving replicas, but it does not revise the row for any other replica. If two replicas rarely (or never) send updates to each other directly, the relevant rows in their epoch number matrices are out of date (possibly consisting of all zeros). This is not a problem, as long as the replicas receive operations indirectly, for example, through a hub replica.

In this case, you must inform sydney about the true state of buenosaires using the chepoch command; this is information that sydney has not received through the standard synchronization mechanism. This information enables sydney to determine which oplog entries to send to buenosaires.

This situation may also occur if you remove oplog entries with the scruboplog command before they are sent to other replicas. You must make sure that you have synchronized the replicas in a family before you scrub oplogs at any of the replicas.