On Thu, Jun 4, 2009 at 10:19 AM, Mark Miller <markrmil...@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-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to