: > FieldCaches are managed using a WeakHashMap - so once the IndexReader's
: > associated with those FieldCaches are no logner used, they will be garbage
: > collected when and if the JVMs garbage collector get arround to it.
: >
: > if they sit arround after you are done with them, they might look like the
: > ytake upa log of memory, but that just means your JVM Heap has that memory
: > to spare and hasn't needed to clean them up yet.
: 
: I don't think this is correct.
: 
: When you register an entry in the fieldcache, it registers event
: listeners on the segment's core so that when its close()d, any entries
: are purged rather than waiting on GC.
: 
: See FieldCacheImpl.java

Ah ... sweet.  I didn't realize that got added.

(In any case: it looks like a WeakHashMap is still used in case the 
listeners never get called, correct?)

But bassed on the details from the OP's first message, it looks like he's 
running Solr 3.x (there's mentions of "SolrIndexReader" which fromat what 
i can tell was gone by 4.0) so perhaps this is an older version before all 
the kinks were worked out in the reader close listeners used by 
fieldcache?  (I'm noticing things like LUCENE-3644 in particular)

Andrea: 

1) which version of Solr are you using?
2) is it possibly you have multiple searchers open (ie: one in use 
while another one is warming up) when you're seeing these stats?



-Hoss

Reply via email to