0

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?).
C. Claudio
  • 177
  • 13

1 Answers1

0

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

Matt Kneiser
  • 1,982
  • 18
  • 23
  • What if such behaviour may be configurable for any database? I couldn't find such a thing, tho: https://jira.mongodb.org/browse/SERVER-1559 – C. Claudio May 23 '23 at 15:27
  • From the discussion in that ticket it appears that what you are looking for is not a current feature. I provided a mechanism to accomplish your task with the current version of the database. For existing collections you can `renameCollection` to the local database or use `mongo-tools` to copy the collection. Again, being careful to understand the limits of the `local` database and having backups prior to this if needed. – Matt Kneiser May 24 '23 at 15:41