mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-01 08:29:09 +00:00
[RECOVERY] Fix potential NPE status reference must be not null to fail recovery
This commit is contained in:
parent
687705364d
commit
275ae2d4da
@ -462,7 +462,7 @@ public class RecoveryTarget extends AbstractComponent {
|
||||
@Override
|
||||
public void onFailure(Throwable t) {
|
||||
try (RecoveriesCollection.StatusRef statusRef = onGoingRecoveries.getStatus(recoveryId)) {
|
||||
if (statusRef == null) {
|
||||
if (statusRef != null) {
|
||||
logger.error("unexpected error during recovery [{}], failing shard", t, recoveryId);
|
||||
onGoingRecoveries.failRecovery(recoveryId,
|
||||
new RecoveryFailedException(statusRef.status().state(), "unexpected error", t),
|
||||
|
Loading…
x
Reference in New Issue
Block a user