Fail recovery if retry recovery if resetRecovery fails
This might fail if the shard is closed for instance. This will leak a shard lock causing the shard being locked on this node forever.
This commit is contained in:
parent
add18a5c99
commit
6a43fe348d
|
@ -148,7 +148,7 @@ public class RecoveryTarget extends AbstractComponent {
|
|||
logger.trace("will retrying recovery with id [{}] in [{}] (reason [{}])", recoveryStatus.recoveryId(), retryAfter, reason);
|
||||
try {
|
||||
recoveryStatus.resetRecovery();
|
||||
} catch (IOException e) {
|
||||
} catch (Throwable e) {
|
||||
onGoingRecoveries.failRecovery(recoveryStatus.recoveryId(), new RecoveryFailedException(currentRequest, e), true);
|
||||
}
|
||||
threadPool.schedule(retryAfter, ThreadPool.Names.GENERIC, new RecoveryRunner(recoveryStatus.recoveryId()));
|
||||
|
|
Loading…
Reference in New Issue