public class Checkpointer extends GridWorker
scheduledCp.nextCpTs -
now > 0 . Method scheduleCheckpoint(long, java.lang.String) uses notify, waitCheckpointEvent() uses wait.
Checkpointer is one threaded which means that only one checkpoint at the one moment possible.
Responsiblity: Provide the API for schedule/trigger the checkpoint. Schedule new checkpoint after current one
according to checkpoint frequency. Failure handling. Managing of page write threads - ? Logging and metrics of
checkpoint. *
Checkpointer steps:
Awaiting checkpoint event.
Collect all dirty pages from page memory under write lock.
Start to write dirty pages to disk.
Finish the checkpoint and write end marker to disk.
isCancelled, log| Modifier and Type | Method and Description |
|---|---|
protected void |
body()
The implementation should provide the execution body for this runnable.
|
void |
cancel()
Cancels this runnable interrupting actual runner.
|
boolean |
cancelOrWaitPartitionDestroy(int grpId,
int partId) |
CheckpointProgress |
currentProgress() |
IgniteInternalFuture<Void> |
enableCheckpoints(boolean enable)
Deprecated.
Should be rewritten to public API.
|
void |
finalizeCheckpointOnRecovery(long cpTs,
UUID cpId,
WALPointer walPtr,
StripedExecutor exec) |
CheckpointProgress |
scheduleCheckpoint(long delayFromNow,
String reason) |
<R> CheckpointProgress |
scheduleCheckpoint(long delayFromNow,
String reason,
IgniteInClosure<? super IgniteInternalFuture<R>> lsnr)
Change the information for a scheduled checkpoint if it was scheduled further than
delayFromNow, or do
nothing otherwise. |
void |
schedulePartitionDestroy(@Nullable CacheGroupContext grpCtx,
int grpId,
int partId) |
void |
shutdownCheckpointer(boolean cancel) |
void |
shutdownNow()
Stopping all checkpoint activity immediately even if the current checkpoint is in progress.
|
void |
skipCheckpointOnNodeStop(boolean skip)
Skip checkpoint on node stop.
|
void |
start()
Restart worker in IgniteThread.
|
IgniteInternalFuture |
wakeupForSnapshotCreation(SnapshotOperation snapshotOperation) |
blockingSectionBegin, blockingSectionEnd, cleanup, heartbeatTs, igniteInstanceName, isCancelled, isDone, join, name, onIdle, run, runner, toString, updateHeartbeatprotected void body()
body in class GridWorkerpublic CheckpointProgress scheduleCheckpoint(long delayFromNow, String reason)
public <R> CheckpointProgress scheduleCheckpoint(long delayFromNow, String reason, IgniteInClosure<? super IgniteInternalFuture<R>> lsnr)
delayFromNow, or do
nothing otherwise.
If lsnr is not null, new checkpoint is always triggered.public IgniteInternalFuture wakeupForSnapshotCreation(SnapshotOperation snapshotOperation)
snapshotOperation - Snapshot operation.public void schedulePartitionDestroy(@Nullable
@Nullable CacheGroupContext grpCtx,
int grpId,
int partId)
grpCtx - Group context. Can be null in case of crash recovery.grpId - Group ID.partId - Partition ID.public boolean cancelOrWaitPartitionDestroy(int grpId,
int partId)
throws IgniteCheckedException
grpId - Group ID.partId - Partition ID.True if the request to destroy the partition was canceled.IgniteCheckedExceptionpublic void cancel()
cancel in class GridWorkerpublic IgniteInternalFuture<Void> enableCheckpoints(boolean enable)
public void shutdownNow()
public void start()
public void shutdownCheckpointer(boolean cancel)
cancel - Cancel flag.public void finalizeCheckpointOnRecovery(long cpTs,
UUID cpId,
WALPointer walPtr,
StripedExecutor exec)
throws IgniteCheckedException
IgniteCheckedException - If failed.public CheckpointProgress currentProgress()
null, if checkpoint has never started.public void skipCheckpointOnNodeStop(boolean skip)
skip - If true skips checkpoint on node stop.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.1 Release Date : December 20 2021