You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/08/05 18:10:32 UTC

[GitHub] [solr] ben-manes commented on a change in pull request #230: SOLR-15555 Improved caching on FilterQuery

ben-manes commented on a change in pull request #230:
URL: https://github.com/apache/solr/pull/230#discussion_r683680979



##########
File path: solr/core/src/java/org/apache/solr/search/CaffeineCache.java
##########
@@ -190,73 +191,72 @@ public V get(K key) {
     return cache.getIfPresent(key);
   }
 
-  @Override
-  public V computeIfAbsent(K key, IOFunction<? super K, ? extends V> mappingFunction) throws IOException {
-    /*
-    This block will get deleted before commit, but I'm leaving it in for now in case I have to go back to that apporach
+  private V computeAsync(K key, IOFunction<? super K, ? extends V> mappingFunction) throws IOException {
+    // First do a lookup first: optimistic non-locking path.
+    // The cache does this for us on get(K, Function), but not putIfAbsent
+    V value = get(key);
+    if (value != null) {
+      return value;
+    }

Review comment:
       Please upgrade to the latest Caffeine version. That oversight was fixed.




-- 
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-unsubscribe@solr.apache.org

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



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