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/PeerRecoveryTargetService.java
@Override
        public void messageReceived(final RecoveryHandoffPrimaryContextRequest request, final TransportChannel channel, Task task)
            throws Exception {
            final RecoveryRef recoveryRef = onGoingRecoveries.getRecoverySafe(request.recoveryId(), request.shardId());
            boolean success = false;
            try {
                recoveryRef.target()
                    .handoffPrimaryContext(
                        request.primaryContext(),
                        ActionListener.runBefore(
                            new ChannelActionListener<>(channel, Actions.HANDOFF_PRIMARY_CONTEXT, request).map(
                                v -> TransportResponse.Empty.INSTANCE
                            ),
                            recoveryRef::close
                        )
                    );
                success = true;
            } finally {
                if (success == false) {
                    recoveryRef.close();
                }
            }
        }
    }
    class TranslogOperationsRequestHandler implements TransportRequestHandler<RecoveryTranslogOperationsRequest> {