Class SnapshotTombstoneManager
java.lang.Object
org.gridgain.internal.snapshots.tombstone.SnapshotTombstoneManager
- All Implemented Interfaces:
org.apache.ignite.internal.lang.Debuggable,org.apache.ignite.internal.manager.IgniteComponent
public class SnapshotTombstoneManager
extends Object
implements org.apache.ignite.internal.manager.IgniteComponent
Manages tombstones preserved for incremental snapshots. Every time a tombstone is created in the partition of persistent storage, it is
saved to the designated tombstones storage. After a configurable timeout these tombstones are deleted.
-
Field Summary
FieldsFields inherited from interface org.apache.ignite.internal.lang.Debuggable
INDENTATION -
Constructor Summary
ConstructorsConstructorDescriptionSnapshotTombstoneManager(org.gridgain.internal.snapshots.configuration.ClusterSnapshotConfiguration snapshotConfiguration, org.apache.ignite.internal.table.distributed.TableManager tableManager, ScheduledExecutorService scheduledExecutorService, ExecutorService clearExecutor, org.apache.ignite.internal.vault.VaultManager vaultManager, org.apache.ignite.internal.hlc.HybridClock clock, org.apache.ignite.internal.failure.FailureProcessor failureProcessor) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.ignite.internal.hlc.HybridTimestampaddOngoingIncrementalSnapshot(UUID snapshotId) Locks the upper bound for cleaning snapshot tombstones and returns the latest value.forceClear(org.apache.ignite.internal.hlc.HybridTimestamp watermark) Runs the clear with specified lowWatermark.Returns ID's of the incremental snapshots locking low watermark.voidremoveOngoingIncrementalSnapshot(UUID snapshotId) Removes the snapshot's lock for the upper bound for cleaning snapshot tombstones.startAsync(org.apache.ignite.internal.manager.ComponentContext componentContext) stopAsync(org.apache.ignite.internal.manager.ComponentContext componentContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.ignite.internal.lang.Debuggable
dumpStateMethods inherited from interface org.apache.ignite.internal.manager.IgniteComponent
beforeNodeStop, stopAsync
-
Field Details
-
DEFAULT_SNAPSHOT_TOMBSTONES_TTL_MINUTES
public static final int DEFAULT_SNAPSHOT_TOMBSTONES_TTL_MINUTES- See Also:
-
-
Constructor Details
-
SnapshotTombstoneManager
public SnapshotTombstoneManager(org.gridgain.internal.snapshots.configuration.ClusterSnapshotConfiguration snapshotConfiguration, org.apache.ignite.internal.table.distributed.TableManager tableManager, ScheduledExecutorService scheduledExecutorService, ExecutorService clearExecutor, org.apache.ignite.internal.vault.VaultManager vaultManager, org.apache.ignite.internal.hlc.HybridClock clock, org.apache.ignite.internal.failure.FailureProcessor failureProcessor) Constructor.- Parameters:
snapshotConfiguration- Snapshot configuration.tableManager- Table manager.scheduledExecutorService- Executor to schedule clears.clearExecutor- Executor to run clears.vaultManager- Vault manager.clock- Hybrid clock.failureProcessor- Failure processor.
-
-
Method Details
-
startAsync
public CompletableFuture<Void> startAsync(org.apache.ignite.internal.manager.ComponentContext componentContext) - Specified by:
startAsyncin interfaceorg.apache.ignite.internal.manager.IgniteComponent
-
stopAsync
public CompletableFuture<Void> stopAsync(org.apache.ignite.internal.manager.ComponentContext componentContext) - Specified by:
stopAsyncin interfaceorg.apache.ignite.internal.manager.IgniteComponent
-
addOngoingIncrementalSnapshot
public org.apache.ignite.internal.hlc.HybridTimestamp addOngoingIncrementalSnapshot(UUID snapshotId) Locks the upper bound for cleaning snapshot tombstones and returns the latest value. It is safe to take incremental snapshot for the tables if last snapshot for these tables was taken after this timestamp.- Parameters:
snapshotId- ID of the snapshot.- Returns:
- Latest value of the low watermark.
-
removeOngoingIncrementalSnapshot
Removes the snapshot's lock for the upper bound for cleaning snapshot tombstones.- Parameters:
snapshotId- ID of the snapshot.
-
forceClear
@TestOnly public CompletableFuture<Void> forceClear(org.apache.ignite.internal.hlc.HybridTimestamp watermark) Runs the clear with specified lowWatermark. -
ongoingIncrementalSnapshots
Returns ID's of the incremental snapshots locking low watermark.
-