Overview
Oplog is an important component in MongoDB used to log the operations in the database. The oplog capacity should be at least 10% of the node capacity, as the oplog records all database operations, including insertions, updates, and deletions. If the oplog capacity is too small, the oplog may be overwritten, affecting the rollback feature of MongoDB. When you purchase an instance, the oplog capacity is 10% of the instance capacity by default and can be expanded to 90% of the instance capacity as needed; however, it cannot be shrunk currently.
Prerequisites
If your instance is pay-as-you-go, make sure that your Tencent Cloud account balance is sufficient.
The instance and its associated instances are in Running status and are not executing any tasks.
Directions
2. In the MongoDB drop-down list on the left sidebar, select Replica Set Instance or Sharded Cluster Instance. The directions for the two types of instances are similar.
3. Above the Instance List on the right, select the region.
4. In the instance list, find the target instance.
5. In the Oplog/Shard Info column, click View/Adjust.
6. In the Adjust Oplog pop-up window, confirm the instance information and evaluate the target oplog capacity based on the current capacity.
Note:
The oplog capacity is at least 10% of the node capacity. When the size of the oplog file reaches the maximum capacity, MongoDB will overwrite previous operation records from the beginning of the file. If the oplog is too small, data may be easily overwritten, thereby affecting the rollback feature of MongoDB.
|
Shard ID | The instance ID. |
Storage Node Quantity | The number of primary and secondary mongod nodes in the instance. |
Total capacity of shard | The mongod node disk capacity per shard. |
Occupied shard capacity | The occupied mongod node capacity per shard. |
Oplog Capacity | The mongod node oplog storage capacity per shard. |
7. Click Next to adjust the oplog capacity.
|
Resource ID | The instance ID. |
Time taken for remaining capacity to be fully occupied | The time it will take for the remaining capacity to be fully occupied. |
Current Total Capacity | The mongod node oplog storage capacity per shard. |
Capacity after Expansion | Expand the oplog capacity on the slider. |
8. Click OK.
Was this page helpful?