mirror of https://github.com/apache/lucene.git
SOLR-10141: Upgrade to Caffeine 2.3.5 to fix issues with removal listener
This commit is contained in:
parent
907c43ce7a
commit
6804f36942
|
@ -23,7 +23,7 @@ com.fasterxml.jackson.core.version = 2.5.4
|
|||
/com.fasterxml.jackson.core/jackson-databind = ${com.fasterxml.jackson.core.version}
|
||||
/com.fasterxml.jackson.dataformat/jackson-dataformat-smile = ${com.fasterxml.jackson.core.version}
|
||||
|
||||
/com.github.ben-manes.caffeine/caffeine = 1.0.1
|
||||
/com.github.ben-manes.caffeine/caffeine = 2.3.5
|
||||
|
||||
/com.google.guava/guava = 14.0.1
|
||||
|
||||
|
|
|
@ -162,6 +162,9 @@ Bug Fixes
|
|||
* SOLR-10121: Fix race conditions in HDFS BlockCache that can contribute to corruption in high
|
||||
concurrency situations. (yonik)
|
||||
|
||||
* SOLR-10141: Upgrade to Caffeine 2.3.5 since v1.0.1 contributed to BlockCache corruption because the
|
||||
removal listener was called more than once for some items and not at all for other items. (Ben Manes, yonik)
|
||||
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
|
|
|
@ -75,8 +75,8 @@ public class BlockCache {
|
|||
lockCounters[i] = new AtomicInteger();
|
||||
}
|
||||
|
||||
RemovalListener<BlockCacheKey,BlockCacheLocation> listener =
|
||||
notification -> releaseLocation(notification.getKey(), notification.getValue());
|
||||
RemovalListener<BlockCacheKey,BlockCacheLocation> listener = (blockCacheKey, blockCacheLocation, removalCause) -> releaseLocation(blockCacheKey, blockCacheLocation);
|
||||
|
||||
cache = Caffeine.newBuilder()
|
||||
.removalListener(listener)
|
||||
.maximumSize(maxEntries)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
eb95a1eb55cb02018b8e0bc1609ce569b455ea98
|
|
@ -0,0 +1 @@
|
|||
672d74bd3fb0611f671ea4bf65e278c8a5d4af3c
|
Loading…
Reference in New Issue