I have a small dataset stored in MongoDB Atlas with very low write activity. This yields an oplog window of 1.5 years! I have short retention policies, but if I have essentially a point-in-time restore going back over a year then they aren't much use.
I see that MongoDB Atlas has a setting for minimum oplog window, but is there a way to set a maximum oplog window?
The only solution I've come up with is to essentially flush the oplog with nonsense like this:
value = value + " hello world"until they are large, e.g. 10MBvalue = value + "!"In about 10 minutes, including figuring out the commands to do all that, I was able to reduce my oplog time from 2 years to 2 hours. But of course it is now growing again...
Obviously this is absurd and not a good path forward .