I cannot find the way to configure a higher MongoDB oplog size in the Bitnami Helm chart for MongoDB, here.
My understanding is that the oplog will keep all the recent data up to a certain size, or age, and then discard it. That oplog allows replicas that went offline to catch up with the primary oplog once they come back online.
However I cannot see the way to configure it, nor I can see the default value that it takes. According to MongoDB documentation, for linux will be 5% of free space, minium of 990MB and maximum of 50GB, but for the Bitnami helm chart this might be different.
I will be saving pictures in the database and they can be around 1MB each after compression. That will fill up an oplog faster than databases using text only.
As a bonus question, is it required for a Hidden Mongo Node to have an oplog the same size as other nodes that could become primary? I could not find the answer to that either.
You can configure it on the bitnami Helm Chart by using the extraFlags
parameter. That parameter will pass the options to the MongoDB startup.
Checking the MongoDB docs you can use the replication.oplogSizeMB
, explained here. The reference is for the MongoDB configuration file, but as explained here the options on the configuration file are equivalent to the command-line options.