Skip to content

Apache Lucene open-source search software

SOLR-1068 followup -- Shutdown the executor in a finally block if it is alive

Shalin Shekhar Mangard1e4980f660d
diff --git a/src/java/org/apache/solr/handler/SnapPuller.java b/src/java/org/apache/solr/handler/SnapPuller.java
index 545f059eb80..f1bb959f968 100644
--- a/src/java/org/apache/solr/handler/SnapPuller.java
+++ b/src/java/org/apache/solr/handler/SnapPuller.java
@@ -305,6 +305,7 @@ public class SnapPuller {
filesToDownload = filesDownloaded = confFilesDownloaded = confFilesToDownload = null;
replicationStartTime = 0;
fileFetcher = null;
+ if (fsyncService != null && !fsyncService.isShutdown()) fsyncService.shutdownNow();
fsyncService = null;
stop = false;
fsyncException = null;