lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Willnauer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-2983) FieldInfos should be read-only if loaded from disk
Date Thu, 24 Mar 2011 17:17:05 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010774#comment-13010774
] 

Simon Willnauer commented on LUCENE-2983:
-----------------------------------------

I will commit this tomorrow. Thanks for the review Mike!

> FieldInfos should be read-only if loaded from disk
> --------------------------------------------------
>
>                 Key: LUCENE-2983
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2983
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>            Assignee: Simon Willnauer
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: LUCENE-2983.patch
>
>
> Currently FieldInfos create a private FieldNumberBiMap when they are loaded from a directory
which is necessary due to some limitation we need to face with IW#addIndexes(Dir). If we add
an index via a directory to an existing index field number can conflict with the global field
numbers in the IW receiving the directories. Those field number conflicts will remain until
those segments are merged and we stabilize again based on the IW global field numbers. Yet,
we unnecessarily creating a BiMap here where we actually should enforce read-only semantics
since nobody should modify this FieldInfos instance we loaded from the directory. If somebody
needs to get a modifiable copy they should simply create a new one and all all FieldInfo instances
to it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message