diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/GatewayRecoveryStatus.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/GatewayRecoveryStatus.java index 60dec83e60b..494ce367af2 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/GatewayRecoveryStatus.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/GatewayRecoveryStatus.java @@ -30,7 +30,7 @@ public class GatewayRecoveryStatus { public enum Stage { INIT((byte) 0), - RETRY((byte) 1), + THROTTLE((byte) 1), INDEX((byte) 2), TRANSLOG((byte) 3), FINALIZE((byte) 4), @@ -50,7 +50,7 @@ public class GatewayRecoveryStatus { if (value == 0) { return INIT; } else if (value == 1) { - return RETRY; + return THROTTLE; } else if (value == 2) { return INDEX; } else if (value == 3) { diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/PeerRecoveryStatus.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/PeerRecoveryStatus.java index e89fbf6df99..1c622ac574f 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/PeerRecoveryStatus.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/PeerRecoveryStatus.java @@ -30,7 +30,7 @@ public class PeerRecoveryStatus { public enum Stage { INIT((byte) 0), - RETRY((byte) 1), + THROTTLE((byte) 1), INDEX((byte) 2), TRANSLOG((byte) 3), FINALIZE((byte) 4), @@ -50,7 +50,7 @@ public class PeerRecoveryStatus { if (value == 0) { return INIT; } else if (value == 1) { - return RETRY; + return THROTTLE; } else if (value == 2) { return INDEX; } else if (value == 3) { diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/TransportIndicesStatusAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/TransportIndicesStatusAction.java index 7258f69c5bc..f255e84bb93 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/TransportIndicesStatusAction.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/action/admin/indices/status/TransportIndicesStatusAction.java @@ -177,8 +177,8 @@ public class TransportIndicesStatusAction extends TransportBroadcastOperationAct case TRANSLOG: stage = PeerRecoveryStatus.Stage.TRANSLOG; break; - case RETRY: - stage = PeerRecoveryStatus.Stage.RETRY; + case THROTTLE: + stage = PeerRecoveryStatus.Stage.THROTTLE; break; case FINALIZE: stage = PeerRecoveryStatus.Stage.FINALIZE; @@ -208,8 +208,8 @@ public class TransportIndicesStatusAction extends TransportBroadcastOperationAct case TRANSLOG: stage = GatewayRecoveryStatus.Stage.TRANSLOG; break; - case RETRY: - stage = GatewayRecoveryStatus.Stage.RETRY; + case THROTTLE: + stage = GatewayRecoveryStatus.Stage.THROTTLE; break; case DONE: stage = GatewayRecoveryStatus.Stage.DONE; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/IndexShardGatewayService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/IndexShardGatewayService.java index 9f98b94e45e..4a74435f19b 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/IndexShardGatewayService.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/IndexShardGatewayService.java @@ -152,7 +152,7 @@ public class IndexShardGatewayService extends AbstractIndexShardComponent implem listener.onIgnoreRecovery("ignoring recovery while waiting on retry, closed"); return; } - recoveryStatus.updateStage(RecoveryStatus.Stage.RETRY); + recoveryStatus.updateStage(RecoveryStatus.Stage.THROTTLE); try { Thread.sleep(recoveryThrottler.throttleInterval().millis()); recoveryStatus.retryTime(System.currentTimeMillis() - recoveryStatus.startTime()); diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/RecoveryStatus.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/RecoveryStatus.java index d94166b974c..6005e0227a6 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/RecoveryStatus.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/RecoveryStatus.java @@ -28,7 +28,7 @@ public class RecoveryStatus { public static enum Stage { INIT, - RETRY, + THROTTLE, INDEX, TRANSLOG, DONE diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/recovery/RecoveryStatus.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/recovery/RecoveryStatus.java index b279d87301a..4cdae0d62f9 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/recovery/RecoveryStatus.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/recovery/RecoveryStatus.java @@ -33,7 +33,7 @@ public class RecoveryStatus { public static enum Stage { INIT, - RETRY, + THROTTLE, INDEX, TRANSLOG, FINALIZE, diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/recovery/RecoveryTarget.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/recovery/RecoveryTarget.java index b16ea20526f..1429276fcd5 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/recovery/RecoveryTarget.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/shard/recovery/RecoveryTarget.java @@ -168,7 +168,7 @@ public class RecoveryTarget extends AbstractComponent { } if (!recoveryThrottler.tryRecovery(shard.shardId(), "peer recovery target")) { - recovery.stage = RecoveryStatus.Stage.RETRY; + recovery.stage = RecoveryStatus.Stage.THROTTLE; recovery.retryTime = System.currentTimeMillis() - recovery.startTime; listener.onRetryRecovery(recoveryThrottler.throttleInterval()); return; @@ -189,7 +189,7 @@ public class RecoveryTarget extends AbstractComponent { return; } logger.trace("[{}][{}] retrying recovery in [{}], source shard is busy", request.shardId().index().name(), request.shardId().id(), recoveryThrottler.throttleInterval()); - recovery.stage = RecoveryStatus.Stage.RETRY; + recovery.stage = RecoveryStatus.Stage.THROTTLE; recovery.retryTime = System.currentTimeMillis() - recovery.startTime; listener.onRetryRecovery(recoveryThrottler.throttleInterval()); return; @@ -231,7 +231,7 @@ public class RecoveryTarget extends AbstractComponent { } if (cause instanceof IndexShardNotStartedException || cause instanceof IndexMissingException || cause instanceof IndexShardMissingException) { - recovery.stage = RecoveryStatus.Stage.RETRY; + recovery.stage = RecoveryStatus.Stage.THROTTLE; recovery.retryTime = System.currentTimeMillis() - recovery.startTime; listener.onRetryRecovery(recoveryThrottler.throttleInterval()); return;