Apache Solr open-source search software
SOLR-8497: Merge indexes should mark it's directories as done rather than keep them around in the directory cache.
markrmiller7d32456efa4a
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 65820f10282..3afc961a99b 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -211,6 +211,9 @@ Bug Fixes* SOLR-8599: After a failed connection during construction of SolrZkClient attempt to retry until a connectioncan be made. (Keith Laban, Dennis Gove)++* SOLR-8497: Merge index does not mark the Directory objects it creates as 'done' and they are retained in the+ Directory cache. (Sivlio Sanchez, Mark Miller)Optimizations----------------------diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminOperation.java b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminOperation.javaindex 8641470e589..094a46c6fca 100644--- a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminOperation.java+++ b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminOperation.java@@ -297,6 +297,7 @@ enum CoreAdminOperation {IOUtils.closeWhileHandlingException(readersToBeClosed);for (Directory dir : dirsToBeReleased) {DirectoryFactory dirFactory = core.getDirectoryFactory();+ dirFactory.doneWithDirectory(dir);dirFactory.release(dir);}if (wrappedReq != null) wrappedReq.close();