Class PeerRecoveryTargetService

  • All Implemented Interfaces:
    IndexEventListener

    public class PeerRecoveryTargetService
    extends java.lang.Object
    implements IndexEventListener
    The recovery target handles recoveries of peer shards of the shard+node to recover to.

    Note, it can be safely assumed that there will only be a single recovery per shard (index+id) and not several of them (since we don't allocate several shard replicas to the same node).

    • Method Detail

      • retryRecovery

        protected void retryRecovery​(long recoveryId,
                                     java.lang.Throwable reason,
                                     TimeValue retryAfter,
                                     TimeValue activityTimeout)
      • retryRecovery

        protected void retryRecovery​(long recoveryId,
                                     java.lang.String reason,
                                     TimeValue retryAfter,
                                     TimeValue activityTimeout)
      • getStartRecoveryRequest

        public static StartRecoveryRequest getStartRecoveryRequest​(org.apache.logging.log4j.Logger logger,
                                                                   DiscoveryNode localNode,
                                                                   RecoveryTarget recoveryTarget,
                                                                   long startingSeqNo)
        Prepare the start recovery request.
        Parameters:
        logger - the logger
        localNode - the local node of the recovery target
        recoveryTarget - the target of the recovery
        startingSeqNo - a sequence number that an operation-based peer recovery can start with. This is the first operation after the local checkpoint of the safe commit if exists.
        Returns:
        a start recovery request