You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Gregory Chanan (JIRA)" <ji...@apache.org> on 2015/10/06 23:44:26 UTC

[jira] [Updated] (SOLR-7967) AddSchemaFieldsUpdateProcessorFactory does not check if the ConfigSet is immutable

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

Gregory Chanan updated SOLR-7967:
---------------------------------
    Attachment: SOLR-7967.patch

Here's a patch.  It only does the immutable ConfigSet check if it's planning to actually add a new field.  Interestingly, that differs from the existing mutable schema check, which checks before looking at the existing fields.  So, if you had a not-mutable schema and an AddSchemaFieldsUpdateProcessorFactory you wouldn't be able to index any data, even data with all existing fields.  That's probably a pre-existing bug, but seems really minor.

> AddSchemaFieldsUpdateProcessorFactory does not check if the ConfigSet is immutable
> ----------------------------------------------------------------------------------
>
>                 Key: SOLR-7967
>                 URL: https://issues.apache.org/jira/browse/SOLR-7967
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 5.3, Trunk
>            Reporter: Gregory Chanan
>            Assignee: Gregory Chanan
>         Attachments: SOLR-7967.patch
>
>
> SOLR-7742 introduced Immutable ConfigSets.  There are checks added to SolrConfigHandler and SchemaHandler so that if a user tries to modify the SolrConfig or the Schema via either of these interfaces an error is returned if the ConfigSet is defined to be immutable.
> Updates to the schema made via the AddSchemaFieldsUpdateProcessorFactory are not checked in this way.  I'm not certain this should be considered a bug.  A ConfigSet is defined by \{SolrConfig, Schema, ConfigSetProperties\}.  On one hand, you can argue that you are modifying the Schema, which is part of the ConfigSet, so the immutable check should apply. On the other hand, the SolrConfig (which defines the AddSchema...Factory} defines that it wants the Config to be updated, so if you view the ConfigSet in totality you could argue nothing is really changing. I'd slightly lean towards adding the check, but could go either way.
> Other opinions?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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