lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject [lucene-solr] branch reference_impl_dev updated: @658 We have to mark closed before we start waiting.
Date Mon, 31 Aug 2020 21:06:36 GMT
This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/reference_impl_dev by this push:
     new 2592681  @658 We have to mark closed before we start waiting.
2592681 is described below

commit 25926815391955cc7c260d4b811ee93232661c10
Author: markrmiller@gmail.com <markrmiller@gmail.com>
AuthorDate: Mon Aug 31 16:00:25 2020 -0500

    @658 We have to mark closed before we start waiting.
---
 solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java b/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java
index 01efa6c..824a569 100644
--- a/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java
+++ b/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java
@@ -193,6 +193,7 @@ public abstract class CachingDirectoryFactory extends DirectoryFactory
{
     }
 
     synchronized (this) {
+      closed = true;
       if (log.isDebugEnabled()) log.debug("Closing {} - {} directories currently being tracked",
this.getClass().getSimpleName(), byDirectoryCache.size());
       TimeOut timeout = new TimeOut(5, TimeUnit.SECONDS,  TimeSource.NANO_TIME); // nocommit
sensible timeout control
       Collection<CacheValue> values = byDirectoryCache.values();
@@ -223,8 +224,6 @@ public abstract class CachingDirectoryFactory extends DirectoryFactory
{
         }
       }
 
-      closed = true;
-
       values = byDirectoryCache.values();
       Set<CacheValue> closedDirs = new HashSet<>();
       for (CacheValue val : values) {


Mime
View raw message