I am trying to import an archive using mongorestore. I have a MongoDB Atlas replica set with 3 nodes. I tried “/writeConcern=majority” and even “/writeConcern=3” but I keep getting a “Replication Oplog Window has gone below 1 hours” email warning. I have found Alert Replication Oplog Window has gone below 1 hours which gives two options. One is exactly to utilize “writeConcern”, while the other being increasing the cluster “oplog size” (which is something I want to avoid).
When you write lots data, your oplog window is going to drop. If it drops below your replication lag the node is going to enter recovering state. Check your metrics, how close did you come to a disaster? If you came close, next time you import a similar amount of data make sure you increase your oplog size. Do not say you don’t want to do it. You have to or you can import your data in smaller batches.