Set MongoDB OpLog to ignore a collection

120 Views Asked by At

Our workflow includes a collection used for caching, with intensive WR ops that hammers the OpLog window across the whole cluster.

Is it possible to tell the OpLog to ignore this collection?

NOTE: Being a cache collection for a backend service, the content is not important for recovery/backup purposes and can be dropped anytime.

EDIT: probably the answer is 'no' because the oplog is used to sync the replicaset nodes, hence nodes won't be synced unless either:

  • W ops write to all nodes at once (unsafe?) or
  • the collection is set up only on one node (not possible?).
1

There are 1 best solutions below

2
Matt Kneiser On

With all the caveats imaginable and with caution, you could consider the local database which doesn't replicate nor log.