lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <yo...@lucidimagination.com>
Subject Re: ReadOnly IndexReaders
Date Thu, 04 Jun 2009 14:25:05 GMT
On Thu, Jun 4, 2009 at 10:19 AM, Mark Miller <markrmiller@gmail.com> wrote:
> If you use hasDeletions() with a non read-only
> Reader, then someone could delete out from under you, right?

Right... but calling isDeleted() doesn't fix that (because of race
conditions).  You could call isDeleted(5) which would return false,
then asynchronously another thread could call deleteDocument(5) before
you get a chance to do something with that doc (and you get
exceptions, etc.)

-Yonik
http://www.lucidimagination.com

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


Mime
View raw message