This is an automated email from the ASF dual-hosted git repository.

sanjaydutt pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 9a9d922088c SOLR-17448 SOLR-17497: IndexFetcher, catch exception 
instead of bubbling up uncaught (#2800)
9a9d922088c is described below

commit 9a9d922088c982508f17e537f5db7bf407a1b037
Author: Sanjay Dutt <[email protected]>
AuthorDate: Thu Oct 31 21:39:48 2024 +0530

    SOLR-17448 SOLR-17497: IndexFetcher, catch exception instead of bubbling up 
uncaught (#2800)
    
    (cherry picked from commit cc30093c5ee988555389b50cf2333edf743bb50f)
---
 solr/core/src/java/org/apache/solr/handler/IndexFetcher.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java 
b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
index 0826f40f3dc..09588fb1be3 100644
--- a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
+++ b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java
@@ -89,6 +89,7 @@ import org.apache.lucene.codecs.CodecUtil;
 import org.apache.lucene.index.IndexCommit;
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.SegmentInfos;
+import org.apache.lucene.store.AlreadyClosedException;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.FSDirectory;
 import org.apache.lucene.store.FilterDirectory;
@@ -1801,7 +1802,7 @@ public class IndexFetcher {
             () -> {
               try {
                 file.sync();
-              } catch (IOException e) {
+              } catch (IOException | AlreadyClosedException e) {
                 fsyncException = e;
               }
             });

Reply via email to