Re: IndexReader.reopen memory leak

2008-06-01 Thread Mark Miller
Yes...I constantly index with 8 threads on one writer while searching with many more threads. Then I let it run for like an hour and watch. The index is tiny to start and then grows to a moderate size...nothing crazy. I am also reopening a lot on a real index of 3.5 million + docs though

Re: IndexReader.reopen memory leak

2008-06-01 Thread Doron Cohen
Hi John, IndexReader newInner=in.reopen(); > if (in!=newInner) > { >in.close(); >this.in=newInner; > >// code to clean up my data >_cache.clear(); >_indexData.load(this, true); >init(_fieldConfig); > } > Just to be sure on this, could

Re: IndexReader.reopen memory leak

2008-05-30 Thread Mark Miller
John Wang wrote: My client does not call my reader.reopen(), I have implemented a reload() method off of my reader (void reload()), and it discards the internal reader upon a reload. Due to another issue (an api issue with IndexReader, e.g. all derived implementations have to reimplement reopen b

Re: IndexReader.reopen memory leak

2008-05-29 Thread John Wang
My client does not call my reader.reopen(), I have implemented a reload() method off of my reader (void reload()), and it discards the internal reader upon a reload. Due to another issue (an api issue with IndexReader, e.g. all derived implementations have to reimplement reopen because it has to re

Re: IndexReader.reopen memory leak

2008-05-29 Thread Michael Busch
Does your FilteredIndexReader.reopen() return a new instance of FilteredIndexReader in case the inner reader was updated (i. e. in!=newInner)? -Michael John Wang wrote: Yes: IndexReader newInner=in.reopen(); if (in!=newInner) { in.close(); this.in=newInner;

Re: IndexReader.reopen memory leak

2008-05-29 Thread Yonik Seeley
On Thu, May 29, 2008 at 12:25 AM, John Wang <[EMAIL PROTECTED]> wrote: > I am using my implementation of a FilteredIndexReader. Perhaps this is the issue? Can you distill a testcase that shows the problem? -Yonik - To unsubscrib

Re: IndexReader.reopen memory leak

2008-05-29 Thread Mark Miller
You are sure you don't have a reference to that old Reader somewhere, hanging around? Maybe this is fixed since I grabbed my copy of Lucene , but I can loop a reopen pretty much forever, and monitoring the memory I see not even the tiniest leak over many many many reopens. Ive been using visual

Re: IndexReader.reopen memory leak

2008-05-29 Thread John Wang
Yes: IndexReader newInner=in.reopen(); if (in!=newInner) { in.close(); this.in=newInner; // code to clean up my data _cache.clear(); _indexData.load(this, true); init(_fieldConfig); } if I change this code to: try {

Re: IndexReader.reopen memory leak

2008-05-29 Thread Michael Busch
Could you share some details about how you implemented reopen() in your reader? -Michael John Wang wrote: Yes, I do close the old reader. I have a large index, my system is doing real time updates: 1 thread writing batches of updates to the index, after each index update, it updates the reader

Re: IndexReader.reopen memory leak

2008-05-28 Thread John Wang
Yes, I do close the old reader. I have a large index, my system is doing real time updates: 1 thread writing batches of updates to the index, after each index update, it updates the reader. I have two readers open always, one is serving the search requests, while the other updates and the two flips

Re: IndexReader.reopen memory leak

2008-05-28 Thread Mark Miller
As someone that has done a lot of reopens, I can vouch there is no leak under simple, normal usage. Are you sure your closing the original reader after getting the reopened reference? Michael Busch wrote: Hi John, hmm not good. I will take a look. It has probably to do with the reference cou

Re: IndexReader.reopen memory leak

2008-05-28 Thread Michael Busch
Hi John, hmm not good. I will take a look. It has probably to do with the reference counting. Are you doing anything special? E. g. do you have own reader implementations that you call reopen() on? What kinds of readers are you using? Are you maybe able to provide a heapdump? -Michael John

IndexReader.reopen memory leak

2008-05-27 Thread John Wang
Hi: We are experiencing memory leak with calling IndexReader.reopen(). From eyeballing the lucene source code, I am seeing normCache is not cleared. Anyone else experiencing this? Thanks -John