public class CheckpointWorkflow extends Object
Checkpointer class with side logic of checkpointing like
checkpoint listeners notifications, WAL records management and checkpoint markers management.
It allows Checkpointer class is to focus on its main responsibility: synchronizing memory with disk.
Additional actions needed during checkpoint are implemented in this class.
Two main blocks of logic this class is responsible for:
markCheckpointBegin(long, org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointProgressImpl, org.apache.ignite.internal.processors.cache.persistence.pagemem.CheckpointMetricsTracker, org.apache.ignite.internal.util.worker.WorkProgressDispatcher) - Initialization of next checkpoint. It collects all required
info
markCheckpointEnd(org.apache.ignite.internal.processors.cache.persistence.checkpoint.Checkpoint) - Finalization of last checkpoint.
dataRegions where to collect dirty pages
and cacheGroupsContexts needed to perform checkpoint operation.| Modifier and Type | Field and Description |
|---|---|
static int |
DFLT_CHECKPOINT_PARALLEL_SORT_THRESHOLD |
| Modifier and Type | Method and Description |
|---|---|
void |
addCheckpointListener(CheckpointListener lsnr,
DataRegion dataRegion)
Adding the listener which will be called only when given data region will be checkpointed.
|
void |
finalizeCheckpointOnRecovery(long cpTs,
UUID cpId,
WALPointer walPtr,
StripedExecutor exec,
CheckpointPagesWriterFactory checkpointPagesWriterFactory)
This method makes sense if node was stopped during the checkpoint(Start marker was written to disk while end
marker are not).
|
List<CheckpointListener> |
getRelevantCheckpointListeners(Collection<DataRegion> checkpointedRegions) |
org.apache.ignite.internal.processors.cache.persistence.checkpoint.Checkpoint |
markCheckpointBegin(long cpTs,
CheckpointProgressImpl curr,
CheckpointMetricsTracker tracker,
WorkProgressDispatcher workProgressDispatcher)
First stage of checkpoint which collects demanded information(dirty pages mostly).
|
void |
markCheckpointEnd(org.apache.ignite.internal.processors.cache.persistence.checkpoint.Checkpoint chp)
Do some actions on checkpoint finish(After all pages were written to disk).
|
void |
memoryRecoveryRecordPtr(WALPointer memoryRecoveryRecordPtr) |
void |
removeCheckpointListener(CheckpointListener lsnr) |
void |
start()
Prepare all structure to further work.
|
void |
stop()
Stop any activity.
|
public static final int DFLT_CHECKPOINT_PARALLEL_SORT_THRESHOLD
public org.apache.ignite.internal.processors.cache.persistence.checkpoint.Checkpoint markCheckpointBegin(long cpTs,
CheckpointProgressImpl curr,
CheckpointMetricsTracker tracker,
WorkProgressDispatcher workProgressDispatcher)
throws IgniteCheckedException
cpTs - Checkpoint start timestamp.curr - Current checkpoint event info.tracker - Checkpoint metrics tracker.workProgressDispatcher - Work progress dispatcher.IgniteCheckedException - if fail.public void markCheckpointEnd(org.apache.ignite.internal.processors.cache.persistence.checkpoint.Checkpoint chp)
throws IgniteCheckedException
chp - Checkpoint snapshot.IgniteCheckedExceptionpublic List<CheckpointListener> getRelevantCheckpointListeners(Collection<DataRegion> checkpointedRegions)
checkpointedRegions - Regions which will be checkpointed.public void finalizeCheckpointOnRecovery(long cpTs,
UUID cpId,
WALPointer walPtr,
StripedExecutor exec,
CheckpointPagesWriterFactory checkpointPagesWriterFactory)
throws IgniteCheckedException
IgniteCheckedException - If failed.public void memoryRecoveryRecordPtr(WALPointer memoryRecoveryRecordPtr)
memoryRecoveryRecordPtr - Memory recovery record pointer.public void addCheckpointListener(CheckpointListener lsnr, DataRegion dataRegion)
lsnr - Listener.dataRegion - Data region for which listener is corresponded to.public void removeCheckpointListener(CheckpointListener lsnr)
lsnr - Listener.public void stop()
public void start()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.1 Release Date : December 20 2021