Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-4359: The RecentUpdates#update method should treat a problem reading the next record the same as a problem parsing the record - log the exception and break.

Mark Robert Miller5cb1a812f098
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 64533b0f584..e33fce8cde3 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -83,6 +83,10 @@ Bug Fixes
* SOLR-4349 : Admin UI - Query Interface does not work in IE
(steffkes)
+* SOLR-4359: The RecentUpdates#update method should treat a problem reading the
+ next record the same as a problem parsing the record - log the exception and
+ break. (Mark Miller)
+
Optimizations
----------------------
diff --git a/solr/core/src/java/org/apache/solr/update/UpdateLog.java b/solr/core/src/java/org/apache/solr/update/UpdateLog.java
index e291b646900..fcafb69ad73 100644
--- a/solr/core/src/java/org/apache/solr/update/UpdateLog.java
+++ b/solr/core/src/java/org/apache/solr/update/UpdateLog.java
@@ -917,10 +917,11 @@ public class UpdateLog implements PluginInfoInitialized {
reader = oldLog.getReverseReader();
while (numUpdates < numRecordsToKeep) {
- Object o = reader.next();
- if (o==null) break;
+ Object o = null;
try {
-
+ o = reader.next();
+ if (o==null) break;
+
// should currently be a List<Oper,Ver,Doc/Id>
List entry = (List)o;