Menu

#11 Memory Leak Token Manager Classes

open
nobody
None
5
2013-01-10
2005-06-02
Anonymous
No

Hi...thanks for all of your hard work on 1.9 Wanted to
report that there is a memory leak in
StandardTokenizerTokenManager and
QueryParserTokenManager InitBlock() methods when
these are instantiated in a Console application.

The leaky code is:

private void InitBlock()
{
System.IO.StreamWriter temp_writer;
temp_writer = new System.IO.StreamWriter
(System.Console.OpenStandardOutput(),
System.Console.Out.Encoding);
temp_writer.AutoFlush = true;
debugStream = temp_writer;
}

I have attached an example to reproduce the behavior.
You'll nee a SQL Server Database though.

Issue exists in 1.9 as well as 1.4.3

Thanks,
Manny Dominguez
manuel@thedigitalgroup.com

Discussion

  • Nobody/Anonymous

    Class for Stressing the QueryParser static Parse method (to reproduce bug)

     
  • Nobody/Anonymous

    Logged In: NO

    What makes you think that there is memory leak?

     
  • Neil Haughton

    Neil Haughton - 2005-08-10

    Logged In: YES
    user_id=1323850

    Thanks Manuel! I have confirmed this empirically and
    submitted a test case to G Aroush. The fix you submitted
    definitely fixes the memory leak even with quite large data
    source, eg an XML data source of several 1000 records.
    Previously this would run out of memory at around 800
    records and take 8 minutes to complete the index. Now it
    does 1000 records in less than 40 seconds.

    Let's hope this is incorporated in the main tree soon.

    N. Haughton
    Reading UK

     

Log in to post a comment.

MongoDB Logo MongoDB