lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: ReadOnly IndexReaders
Date Thu, 04 Jun 2009 14:19:01 GMT
Yonik Seeley wrote:
> On Thu, Jun 4, 2009 at 9:37 AM, Mark Miller <markrmiller@gmail.com> wrote:
>   
>> I was thinking you have a read-only snapshot to check on the deletes though.
>> Another thread
>> can't do a delete with that Reader, and if they are doing it on another
>> Reader, it wouldn't
>> affect the snapshot the read-only Reader had opened?
>>     
>
> That would work, but it still comes back to the same thing, right?  If
> you want to avoid calling isDeleted() then just check hasDeletions()
> regardless of if the reader is readOnly.
>
> -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
>
>   
Well now I'm confused. If you use hasDeletions() with a non read-only 
Reader, then someone could delete out from under you, right?

But I guess, if you ignore that, its really the same as having a 
read-only reader anyway, and shouldn't harm anything?

Okay, I think I get you.

-- 
- Mark

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