From f62f7b8ffe323ec83ea4079ba9dcd525cdaaacef Mon Sep 17 00:00:00 2001 From: kimchy Date: Fri, 20 Aug 2010 17:17:32 +0300 Subject: [PATCH] check the progress in case the index size has not been set yet... --- .../action/admin/indices/status/GatewayRecoveryStatus.java | 2 +- .../action/admin/indices/status/PeerRecoveryStatus.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 0627d4d823e..60dec83e60b 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 @@ -171,7 +171,7 @@ public class GatewayRecoveryStatus { public int indexRecoveryProgress() { if (recoveredIndexSize == 0) { - if (indexSize == reusedIndexSize) { + if (indexSize != 0 && indexSize == reusedIndexSize) { return 100; } return 0; 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 ffadec507eb..e89fbf6df99 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 @@ -160,7 +160,7 @@ public class PeerRecoveryStatus { public int indexRecoveryProgress() { if (recoveredIndexSize == 0) { - if (indexSize == reusedIndexSize) { + if (indexSize != 0 && indexSize == reusedIndexSize) { return 100; } return 0;