bruno-roustant commented on a change in pull request #2066:
URL: https://github.com/apache/lucene-solr/pull/2066#discussion_r520089739



##########
File path: solr/core/src/java/org/apache/solr/core/SolrCores.java
##########
@@ -536,7 +538,9 @@ public void queueCoreToClose(SolrCore coreToClose) {
    * @return the cache holding the transient cores; never null.
    */
   public TransientSolrCoreCache getTransientCacheHandler() {

Review comment:
       I don't think so. Let's say transientSolrCoreCacheFactory = A. If there 
is a race and load() is called between getTransientCacheHandler() and 
TransientSolrCoreCache.close(). getTransientCacheHandler() returns A, then 
load() sets B, and then A.close() is called. It is the same result as the 
sequence { getTransientCacheHandler().close() } atomically on A, and then 
load() B.
   
   But actually it doesn't matter. So I can add a synchronized (modifyLock) 
around if you prefer.
   I'll keep anyway the synchronized inside getTransientCacheHandler() because 
it is public.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to