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:
Simon Willnauer 2015-05-13 16:47:18 +02:00
parent add18a5c99
commit 6a43fe348d
1 changed files with 1 additions and 1 deletions

View File

@ -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()));