cpoerschke commented on a change in pull request #601:
URL: https://github.com/apache/solr/pull/601#discussion_r805747775



##########
File path: solr/core/src/java/org/apache/solr/update/UpdateLog.java
##########
@@ -2002,13 +2009,15 @@ public void doReplay(TransactionLog translog) {
           translog.writeCommit(cmd);
         }
 
-        try {
-          proc.finish();
-        } catch (IOException ex) {
-          recoveryInfo.errors.incrementAndGet();
-          loglog.error("Replay exception: finish()", ex);
-        } finally {
-          IOUtils.closeQuietly(proc);
+        for (UpdateRequestProcessor proc : procPool) {
+          try {
+            proc.finish();
+          } catch (IOException ex) {
+            recoveryInfo.errors.incrementAndGet();
+            loglog.error("Replay exception: finish()", ex);
+          } finally {
+            IOUtils.closeQuietly(proc);
+          }

Review comment:
       Added commit here to have just the one for-loop rather than separate 
ones for `finish` and `close` -- if one `proc.finish` throws an exception then 
for the others `finish` would still be called. If multiple `proc.finish` were 
to throw then the errors counter would be incremented multiple times (rather 
than just once) but that seems less bad than the `finish` not being called for 
all the `proc` objects. WDYT?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to