The `recoverLocallyUpToGlobalCheckpoint` step of peer recovery may take an extended period of time, but today we do not disable the recovery monitor during this step so if it takes more than 30 minutes (by default) then the recovery will time out, fail, and retry repeatedly. We should disable the recovery monitor during this step.
server/src/main/java/org/elasticsearch/indices/recovery/RecoveryTarget.java
private final Logger logger;
    private static final AtomicLong idGenerator = new AtomicLong();
    private static final String RECOVERY_PREFIX = "recovery.";
    private final ShardId shardId;
    private final long recoveryId;
    private final IndexShard indexShard;
    private final DiscoveryNode sourceNode;
    private final SnapshotFilesProvider snapshotFilesProvider;
    private volatile MultiFileWriter multiFileWriter;
    private final RecoveryRequestTracker requestTracker = new RecoveryRequestTracker();
    private final Store store;
    private final PeerRecoveryTargetService.RecoveryListener listener;
    private final AtomicBoolean finished = new AtomicBoolean();
    private final CancellableThreads cancellableThreads;
    
    private volatile long lastAccessTime = System.nanoTime();
    private volatile boolean recoveryMonitorEnabled = true;
    @Nullable 
    private volatile Releasable snapshotFileDownloadsPermit;
    
    private final CountDownLatch closedLatch = new CountDownLatch(1);
    /**