Hi Yonik!

On May 29, 2007, at 4:02 PM, Yonik Seeley wrote:

You are right for general usage of RefCounted... I should probably add
a comment to that class.
Solr as a whole doesn't have a problem though because other locking
ensures that once the refcount reaches 0, no one will increment it
again.
SolrCore holds a reference itself, and only calls decref in
SolrCore.registerSearcher() which is synchronized on searcherLock.
Once the refcount is 0, there will be another registered searcher that
will be handed out (incref()).

Cool, I'm currently implementing a similar thing for our own code base and
for us this doesn't hold true (we are not using Solr, though).
Good to know that I'm not paranoid and that Solr doesn't have that problem :)

Thanks,

-k
--
Kay Röpke
http://www.epublica.de

epublica GmbH, Gänsemarkt 43, 20354 Hamburg, Tel. +49 (0)40/4109879-0
GF: Heiner Jürgensen, Michael Otto, Norbert Schuler, Hanno Zulla
Registergericht: Amtsgericht Hamburg, HRB 89162



Reply via email to