lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trejkaz <trej...@trypticon.org>
Subject Re: Is there a way to share IndexReader data sensibly across independent callers?
Date Tue, 09 Feb 2016 11:39:48 GMT
On Tue, Feb 9, 2016 at 7:59 PM, Michael McCandless
<lucene@mikemccandless.com> wrote:
> Can't you just call ReaderManager.close?
>
> All in-flight operations with that RM will keep working, and the
> underlying reader will only finally close once they have all finished.

I guess that has the caveat that it would be possible to have two
readers open on the same directory, which is mostly what I was trying
to avoid. My current solution absolutely prevents that, at the cost of
having to synchronise when acquiring or releasing, although I can
probably use double-checked locking to reduce the impact of that.

Really what would be handy is something that resembles ReaderManager
but takes Path for every method and also opens and closes the
Directory...

TX

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message