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

houston pushed a commit to branch add-pki-caching
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 849ec5b7c52eb6bf43c2b5b69eb8b2c0d55ab416
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 d439f7196cd..ac564e1b672 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;
@@ -1807,7 +1808,7 @@ public class IndexFetcher {
             () -> {
               try {
                 file.sync();
-              } catch (IOException e) {
+              } catch (IOException | AlreadyClosedException e) {
                 fsyncException = e;
               }
             });

Reply via email to