[ 
https://issues.apache.org/jira/browse/LUCENE-4492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Uwe Schindler updated LUCENE-4492:
----------------------------------

    Fix Version/s:     (was: 4.3)
                   4.4
    
> Immutable Suggester impls. should be immutable
> ----------------------------------------------
>
>                 Key: LUCENE-4492
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4492
>             Project: Lucene - Core
>          Issue Type: Wish
>          Components: modules/other
>    Affects Versions: 3.6.1, 4.0, 4.1
>            Reporter: Simon Willnauer
>             Fix For: 4.4
>
>
> Currently we have a very clumsy interface to build and load the Suggesters 
> that are immutable. All our FST impls must be somewhat pre-build and then 
> loaded. But currently the code doesn't declare the fst member as final and 
> lets you change it at any time. ie you can always call load / build. This 
> makes safe publication tricky and required custom code to make this 
> reasonable. Ie. you have as suggester that can reload it's dict every 20 min. 
> Now if you want to swap this in once loaded you can create a new Lookup 
> instance and assign it to a member in your app. Yet this member needs to be 
> volatile otherwise threads won't fetch all the memory and you can run into 
> NPE exceptions since the fst member is not final. I'd not want to pay the 
> price for this volatile read in a suggest env since its really read-only. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to