ID | IEP-109 |
Author | |
Sponsor | |
Created | 17.07.2023 |
Status | DRAFT |
IEP-43 introduces persistent caches snapshots feature. This feature highly adopted by Ignite users.
In-memory caches snapshots will simplify the following use-cases:
in-memory snapshots will resuse existing snapshot code when possible. So key design decisions stay the same. It assumed that reader knows and understand IEP-43. So design description will focus on difference on persistence and in-memory snapshot.
Only PME required for in-memory snapshots. We can set write listener during PME because no concurrent transactions allowed.
See:
PartitionsExchangeAware#onDoneBeforeTopologyUnlock
IgniteSnapshotManager#onDoneBeforeTopologyUnlock
SnapshotFutureTask#start
In-memory caches store pages in configured DataRegion
. Page for specific cache group allocated in some Segment
of data region.
So, unlike persistent caches it more convinient and error-prone to create snapshot of the DataRegion with all caches in it.
During creation of snapshot node must track all page changes which can be implemented by the listener of write locks in PageMemoryNoStoreImpl
.
CRC for each page must be calculated and written to snapshot metadata during snapshotting.
CRC must be checked during restore.
must be properly prepared and saved during snapshot.
DataRegionConfiguration#persistenceEnabled=false
for in-memory caches by the definition.
The same value must be for DataRegionConfiguration when cache group restored from in-memory snapshot.
After this feature implemented PageIO
will require to be backward compatible.
// Links to discussions on the devlist, if applicable.