mirror of
https://github.com/apache/lucene.git
synced 2025-02-27 21:09:19 +00:00
LRUCache impl synchronizes on the map, not the cache
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@681440 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a00e9176f0
commit
a7cda85584
@ -113,12 +113,12 @@ public class LRUCache implements SolrCache {
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized Object put(Object key, Object value) {
|
||||
if (state == State.LIVE) {
|
||||
stats.inserts.incrementAndGet();
|
||||
}
|
||||
|
||||
public Object put(Object key, Object value) {
|
||||
synchronized (map) {
|
||||
if (state == State.LIVE) {
|
||||
stats.inserts.incrementAndGet();
|
||||
}
|
||||
|
||||
// increment local inserts regardless of state???
|
||||
// it does make it more consistent with the current size...
|
||||
inserts++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user