Class SnapshotShutdownProgressTracker

java.lang.Object
org.elasticsearch.snapshots.SnapshotShutdownProgressTracker

public class SnapshotShutdownProgressTracker extends Object
Tracks progress of shard snapshots during shutdown, on this single data node. Always tracks the progress of snapshots, but only logs the period progress report once node shutdown starts. See SNAPSHOT_PROGRESS_DURING_SHUTDOWN_LOG_INTERVAL_SETTING for the logging interval.
  • Field Details

    • SNAPSHOT_PROGRESS_DURING_SHUTDOWN_LOG_INTERVAL_SETTING

      public static final Setting<TimeValue> SNAPSHOT_PROGRESS_DURING_SHUTDOWN_LOG_INTERVAL_SETTING
      How frequently shard snapshot progress is logged after receiving local node shutdown metadata.
  • Constructor Details

  • Method Details

    • onClusterStateAddShutdown

      public void onClusterStateAddShutdown()
      Called as soon as a node shutdown signal is received.
    • onClusterStatePausingSetForAllShardSnapshots

      public void onClusterStatePausingSetForAllShardSnapshots()
      Called when the cluster state update processing a shutdown signal has finished signalling (setting PAUSING) all shard snapshots to pause.
    • onClusterStateRemoveShutdown

      public void onClusterStateRemoveShutdown()
      The cluster state indicating that a node is to be shutdown may be cleared instead of following through with node shutdown. In that case, no further shutdown shard snapshot progress reporting is desired.
    • incNumberOfShardSnapshotsInProgress

      public void incNumberOfShardSnapshotsInProgress(ShardId shardId, Snapshot snapshot)
      Tracks how many shard snapshots are started.
    • decNumberOfShardSnapshotsInProgress

      public void decNumberOfShardSnapshotsInProgress(ShardId shardId, Snapshot snapshot, IndexShardSnapshotStatus shardSnapshotStatus)
      Tracks how many shard snapshots have finished since shutdown mode began.
    • trackRequestSentToMaster

      public void trackRequestSentToMaster(Snapshot snapshot, ShardId shardId)
      Uniquely tracks a request to update a shard snapshot status sent to the master node. Idempotent, safe to call multiple times.
      Parameters:
      snapshot - first part of a unique tracking identifier
      shardId - second part of a unique tracking identifier
    • releaseRequestSentToMaster

      public void releaseRequestSentToMaster(Snapshot snapshot, ShardId shardId)
      Stops tracking a request to update a shard snapshot status sent to the master node. Idempotent, safe to call multiple times.
      Parameters:
      snapshot - first part of a unique tracking identifier
      shardId - second part of a unique tracking identifier