1.

How can we change the size of oplog?

Answer»

Idempotence is the property of certain operations whereby they can be applied multiple times WITHOUT changing the result beyond the initial application. In MongoDB, oplog is idempotent meaning even if they are applied multiple times the same output will be produced. So if the server goes down and we need to apply oplogs there WOULD not be any inconsistency, even if it applies any logs that were ALREADY applied there will not be CHANGED in the database end state.

Also, there was a desire to have a new state of a document to be independent of the previous state. For these all operators that rely on the previous state to determine new value needed to be TRANSFORMED to see the actual values. For example, if an addition operation results in modifying the value from ‘21’ to ’30’, the operation should be changed to set value ‘30’ on the field. Replaying the operator multiple times should produce the same result.



Discussion

No Comment Found