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

    Fields
    Modifier and Type
    Field
    Description
    static final int
     

    Fields inherited from interface org.apache.ignite.internal.lang.Debuggable

    INDENTATION
  • Constructor Summary

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.ignite.internal.hlc.HybridTimestamp
    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.
    void
    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, wait

    Methods inherited from interface org.apache.ignite.internal.lang.Debuggable

    dumpState

    Methods 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:
      startAsync in interface org.apache.ignite.internal.manager.IgniteComponent
    • stopAsync

      public CompletableFuture<Void> stopAsync(org.apache.ignite.internal.manager.ComponentContext componentContext)
      Specified by:
      stopAsync in interface org.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

      public void removeOngoingIncrementalSnapshot(UUID snapshotId)
      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

      @TestOnly public Set<UUID> ongoingIncrementalSnapshots()
      Returns ID's of the incremental snapshots locking low watermark.