You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2010/05/15 16:41:42 UTC

[jira] Issue Comment Edited: (SOLR-1877) Investigate unclosed Reader in IndexBasedSpellCheck

    [ https://issues.apache.org/jira/browse/SOLR-1877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12867875#action_12867875 ] 

Yonik Seeley edited comment on SOLR-1877 at 5/15/10 10:41 AM:
--------------------------------------------------------------

I really don't know the spellcheck framework, but I did just take a quick look...

It seems like we have multiple readers to worry about:
1)  the reader possibly obtained from solr
2) any reader opened explicitly by IndexBasedSpellChecker
3) the reader the lucene spellchecker has

This patch looks like it would try to close a solr-obtained reader too.  It would also be nice to close all of the readers when the core is closed, and not just on a reload too.

The whole spellchecker  thing looks a bit fragile actually... what's stopping the obtained reader from being closed by solr?
We may need to expand the review to the whole solr spellchecker to figure out how to address these problems correctly.

edit: after a quick peek at the lucene SpellChecker, it wasn't really architected for being able to switch indexes while serving requests 100% reliably either.  So if one reloads a spellcheck index, it seems that there's always a chance of messing up a previous solr request that's still in flight.

      was (Author: yseeley@gmail.com):
    I really don't know the spellcheck framework, but I did just take a quick look...

It seems like we have multiple readers to worry about:
1)  the reader possibly obtained from solr
2) any reader opened explicitly by IndexBasedSpellChecker
3) the reader the lucene spellchecker has

This patch looks like it would try to close a solr-obtained reader too.  It would also be nice to close all of the readers when the core is closed, and not just on a reload too.

The whole spellchecker  thing looks a bit fragile actually... what's stopping the obtained reader from being closed by solr?
We may need to expand the review to the whole solr spellchecker to figure out how to address these problems correctly.
  
> Investigate unclosed Reader in IndexBasedSpellCheck
> ---------------------------------------------------
>
>                 Key: SOLR-1877
>                 URL: https://issues.apache.org/jira/browse/SOLR-1877
>             Project: Solr
>          Issue Type: Bug
>          Components: spellchecker
>            Reporter: Mark Miller
>            Priority: Minor
>             Fix For: 1.5
>
>         Attachments: SOLR-1877.patch
>
>
> Looks like IndexBasedSpellcheck creates a Reader that it passes to HighFrequencyDictionary that never gets closed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org