madrob commented on a change in pull request #230:
URL: https://github.com/apache/solr/pull/230#discussion_r676963537



##########
File path: solr/core/src/java/org/apache/solr/search/facet/UnInvertedField.java
##########
@@ -605,80 +605,7 @@ public static UnInvertedField getUnInvertedField(String 
field, SolrIndexSearcher
     if (cache == null) {
       return new UnInvertedField(field, searcher);
     }
-    AtomicReference<Throwable> throwableRef = new AtomicReference<>();
-    UnInvertedField uif = cache.computeIfAbsent(field, f -> {
-      UnInvertedField newUif;
-      try {
-        newUif = new UnInvertedField(field, searcher);
-      } catch (Throwable t) {
-        throwableRef.set(t);
-        newUif = null;
-      }
-      return newUif;
-    });
-    if (throwableRef.get() != null) {
-      rethrowAsSolrException(field, throwableRef.get());
-    }
-    return uif;
-
-    // (ab) if my understanding is correct this whole block tried to mimic the

Review comment:
       ConcurrentHashMap does locking on the Node entry, which is either the 
collision list (up to 8 keys) or a Fibonacci tree bin (when larger than 8 
keys), so I think this risk of locking other consumers out is small, but not 
negligible. I've started moving toward a reservation node approach, which is 
similar in spirit, but hopefully much less complex in practice!




-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

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



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

Reply via email to