Since the WAL file constantly grows, it takes a significant amount of time to recover the cluster by going over the file from head to tail. To mitigate this, Ignite introduces a checkpointing process.
Checkpointing is the process of copying dirty pages from RAM to partition files on disk. A dirty page is a page that was updated in RAM but was not written to a respective partition file (an update was just appended to the WAL).
This process helps to utilize disk space frugally by keeping pages in the most up-to-date state on disk and allowing the removal of outdated WAL segments (files) from the WAL archive.
Let's review an execution flow of a simple update operation, as shown below:
- Once a cluster node receives an update request, it will look up the data page in RAM where the value is to be inserted or updated. The page will be updated and marked as dirty.
- The update is appended to the tail of the WAL.
- The node sends an acknowledgment to the update initiator confirming the success of the operation.
- Checkpointing is triggered periodically depending on the frequency set in your configuration or other parameters. The dirty pages are copied from RAM to disk and passed on to specific partition files.
Updated about a year ago