Class RaftLogTruncater

java.lang.Object
org.gridgain.internal.recovery.RaftLogTruncater

public class RaftLogTruncater extends Object
Class for truncating Raft log prefix.
  • Constructor Summary

    Constructors
    Constructor
    Description
    RaftLogTruncater(String nodeName, org.apache.ignite.internal.table.distributed.TableManager tableManager, org.apache.ignite.internal.partition.replicator.PartitionReplicaLifecycleManager partitionReplicaLifecycleManager, org.apache.ignite.internal.replicator.ReplicaManager replicaManager, org.apache.ignite.internal.components.NodeProperties nodeProperties, org.apache.ignite.internal.util.IgniteSpinBusyLock busyLock)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Truncates Raft log prefix up to a non-zero index.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RaftLogTruncater

      public RaftLogTruncater(String nodeName, org.apache.ignite.internal.table.distributed.TableManager tableManager, org.apache.ignite.internal.partition.replicator.PartitionReplicaLifecycleManager partitionReplicaLifecycleManager, org.apache.ignite.internal.replicator.ReplicaManager replicaManager, org.apache.ignite.internal.components.NodeProperties nodeProperties, org.apache.ignite.internal.util.IgniteSpinBusyLock busyLock)
      Constructor.
  • Method Details

    • truncateRaftLog

      public CompletableFuture<Void> truncateRaftLog(RecoveryRequest request)
      Truncates Raft log prefix up to a non-zero index.

      This is needed because data from GG snapshots is inserted bypassing the replication layer. In other words, all inserted data does not have a corresponding Raft log entry and will not be taken into account during replication. To bypass this, we make Raft think that all this data is a part of one big Raft snapshot by causing Raft log to be truncated.