...
...
Page store is the storage for all pages related to particual cache (cache and its partition. 's partitions and SQL indexes).
Using page identifier it is possible to map from page ID to file and to position in particular file:
No Format |
---|
pageId = ... || partition ID || page index and (idx) //pageId can be easily converted to file + offset in this file offset = idx * pageSize |
...
Cache page storage contains following files:
Checkpointing can be defined as process of storing dirty pages from RAM on a disk, with results of consistent memory state is saved to disk. At the point of process end, page state is saved as it was for the time the process begins.
There are two approaches to implementation of checkpointing:Can be of two types
Implemented Approach implemented in Ignite - Sharp Checkpoint; F.C. - to be done in future releases.
To achieve consistency Checkpoint checkpoint read-write lock is used (see GridCacheDatabaseSharedManager#checkpointLock)
Under CP checkpoint write lock held we do the following:
And then CP then checkpoint write lock is released, updates and transactions can run.
...
Copy on write technique is used. If there is modification in page which is under CP checkpoint now we will create temporary copy of page.
...
...
Possible future optimisation: for full update we may send page store file over network.
Order of nodes join is not relevant, there is possible situation that oldest node has older partition state, but joining node has higher partition counter. In this case rebalancing will be triggered by coordinator. Rebalancing will be performed from the newly joined node to existing one (note this behaviour may be changed under IEP-4 Baseline topology for caches)
In corner case we need to store WAL only for 1 checkpoint in past for successful recovery (PersistentStoreConfiguration#walHistSize )
...