SOLR-12774: IndexOutOfBoundsException on logging startupVersions

This commit is contained in:
Cao Manh Dat 2018-10-01 15:25:30 +07:00
parent 3ece536d81
commit 93e2ae3fc4
1 changed files with 115 additions and 111 deletions

View File

@ -449,7 +449,7 @@ public class RecoveryStrategy implements Runnable, Closeable {
}
// TODO: perhaps make this grab a new core each time through the loop to handle core reloads?
final public void doSyncOrReplicateRecovery(SolrCore core) throws Exception {
public final void doSyncOrReplicateRecovery(SolrCore core) throws Exception {
boolean successfulRecovery = false;
UpdateLog ulog;
@ -488,7 +488,11 @@ public class RecoveryStrategy implements Runnable, Closeable {
log.info("currentVersions size={} range=[{} to {}]", recentVersions.size(), recentVersions.get(0), recentVersions.get(recentVersions.size()-1));
}
if (startingVersions.isEmpty()) {
log.info("startupVersions is empty");
} else {
log.info("startupVersions size={} range=[{} to {}]", startingVersions.size(), startingVersions.get(0), startingVersions.get(startingVersions.size()-1));
}
} catch (Exception e) {
SolrException.log(log, "Error getting recent versions.", e);
recentVersions = new ArrayList<>(0);