corrupt index metric update only for remaining failing indexes
@@ -88,10 +88,11 @@ public class TrackingCorruptIndexHandler implements CorruptIndexHandler {
CorruptIndexInfo info = indexes.remove(indexPath);
if (info != null){
log.info("Index at [{}] which was so far failing {} is now working again.", info.path, info.getStats());
- } else if (meter != null) {
- meter.mark();
}
}
+ if (meter != null && !indexes.isEmpty()) {
+ meter.mark(indexes.size());
+ }
}
public boolean isFailing(String asyncName) {
