ben-manes commented on PR #1118:
URL: https://github.com/apache/solr/pull/1118#issuecomment-1289458504

   Is this perhaps related to the JIT loop unrolling bug 
(https://github.com/ben-manes/caffeine/issues/797, 
[SOLR-16463](https://issues.apache.org/jira/browse/SOLR-16463))? (/cc 
@uschindler)
   
   If you think this is instead a bug in Caffeine, please try to provide a 
reproducer so that we can isolate a fix. When I run a 
[stress](https://github.com/ben-manes/caffeine/blob/master/caffeine/src/test/java/com/github/benmanes/caffeine/cache/Stresser.java)
 and 
[Lincheck](https://github.com/ben-manes/caffeine/blob/master/caffeine/src/test/java/com/github/benmanes/caffeine/lincheck/AbstractLincheckCacheTest.java)
 tests it is fine, but these can be tricky. The `put` is optimized as a retry 
look instead of a pessimistic compute (2x faster), but in a microbenchmark so 
likely not important in an actual workload and correctness is more important.
   
   It looks like `asMap().compute` is the correct replacement as `Cache.get` is 
the same as `Map.computeIfAbsent` and this inserts or replaces an existing 
value. 


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