RE: Lucene appears to use memory maps after unmapping them

2012-02-01 Thread Uwe Schindler
e.apache.org > Subject: Re: Lucene appears to use memory maps after unmapping them > > On Wed, Feb 1, 2012 at 11:30 AM, Robert Muir wrote: > > the problem is caused by searching indexreaders after you closed them. > > > > in general we can try to add more and more safety, but

Re: Lucene appears to use memory maps after unmapping them

2012-02-01 Thread Michael McCandless
On Tue, Jan 31, 2012 at 9:42 PM, Trejkaz wrote: > So when we close() our own TextIndex wrapper class, it would call > decRef() - but if another thread is still using the index, this call > to decRef() wouldn't actually close the reader. IMO, this wouldn't > really satisfy the meaning of "close" f

Re: Lucene appears to use memory maps after unmapping them

2012-01-31 Thread Trejkaz
On Wed, Feb 1, 2012 at 1:14 PM, Robert Muir wrote: > > No, I don't think you should use close at all, because your problem is > you are calling close() when its unsafe to do so (you still have other > threads that try to search the reader after you closed it). > > Instead of trying to fix the bugs

Re: Lucene appears to use memory maps after unmapping them

2012-01-31 Thread Robert Muir
On Tue, Jan 31, 2012 at 8:32 PM, Trejkaz wrote: > On Wed, Feb 1, 2012 at 11:30 AM, Robert Muir wrote: >> the problem is caused by searching indexreaders after you closed them. >> >> in general we can try to add more and more safety, but at the end of the day, >> if you close an indexreader while

Re: Lucene appears to use memory maps after unmapping them

2012-01-31 Thread Trejkaz
On Wed, Feb 1, 2012 at 11:30 AM, Robert Muir wrote: > the problem is caused by searching indexreaders after you closed them. > > in general we can try to add more and more safety, but at the end of the day, > if you close an indexreader while a search is running, you will have problems. > > So be

Re: Lucene appears to use memory maps after unmapping them

2012-01-31 Thread Robert Muir
the problem is caused by searching indexreaders after you closed them. in general we can try to add more and more safety, but at the end of the day, if you close an indexreader while a search is running, you will have problems. So be careful to only close indexreaders that are no longer in use!

Lucene appears to use memory maps after unmapping them

2012-01-31 Thread Trejkaz
Hi all. I've found a rather frustrating issue which I can't seem to get to the bottom of. Our application will crash with an access violation around the time when the index is closed, with various indications of what's on the stack, but the common things being SegmentTermEnum.next and MMapIndexIn