From 85013ffd310943e7b742d250033bed6e908d4685 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Sun, 26 Feb 2012 16:34:19 +0000 Subject: [PATCH] logging: fix detection of updates since startup git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1293866 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/java/org/apache/solr/cloud/RecoveryStrategy.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java index 175bda40b67..ab28651b796 100644 --- a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java +++ b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java @@ -229,10 +229,11 @@ public class RecoveryStrategy extends Thread implements SafeStopThread { if (startingRecentVersions.get(oldIdx) == firstStartingVersion) break; } - if (oldIdx < startingRecentVersions.size()) { - log.info("####### Found new versions added after startup: num=" + (startingRecentVersions.size()-oldIdx)); + if (oldIdx > 0) { + log.info("####### Found new versions added after startup: num=" + oldIdx); } - + + // TODO: only log at debug level in the future (or move to oldIdx > 0 block) log.info("###### startupVersions=" + reallyStartingVersions); log.info("###### currentVersions=" + startingRecentVersions); }