Solr
  1. Solr
  2. SOLR-1824

partial field types created on error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 4.0-ALPHA
    • Component/s: None
    • Labels:
      None

      Description

      When abortOnConfigurationError=false, and there is a typo in one of the filters in a chain, the field type is still created by omitting that particular filter. This is particularly dangerous since it will result in incorrect indexing.

        Issue Links

          Activity

          Hide
          Yonik Seeley added a comment -

          The partial field is created regardless of abortOnConfigurationError... it's just more serious when it's false and things may look OK.

          Show
          Yonik Seeley added a comment - The partial field is created regardless of abortOnConfigurationError... it's just more serious when it's false and things may look OK.
          Hide
          Uwe Schindler added a comment -

          It should be easy to fix. The init() method in the AbstractPluginLoader anonymous class checks for plugin!=null. In the null case it should throw exception to make the whole loadAnalyzer() call invalid, what makes the field type disappear.

          Show
          Uwe Schindler added a comment - It should be easy to fix. The init() method in the AbstractPluginLoader anonymous class checks for plugin!=null. In the null case it should throw exception to make the whole loadAnalyzer() call invalid, what makes the field type disappear.
          Hide
          Hoss Man added a comment -

          Can someone point me to a method name and/or line number? ... i'm not following what exactly is the current bug.

          (particularly with regards to abortOnConfigurationError=false ... nothing in IndexSchema has ever looked at that config option, so if it has any problem initing a field/fieldtype it should be throwing an exception and completly failing to initialize – so i don't see how the problem could be any better/worse depending on the value of that option)

          Show
          Hoss Man added a comment - Can someone point me to a method name and/or line number? ... i'm not following what exactly is the current bug. (particularly with regards to abortOnConfigurationError=false ... nothing in IndexSchema has ever looked at that config option, so if it has any problem initing a field/fieldtype it should be throwing an exception and completly failing to initialize – so i don't see how the problem could be any better/worse depending on the value of that option)
          Hide
          Hoss Man added a comment -

          Scratch that – i get it now:

          • IndexSchem uses anonymous subclasses of AbstractPluginLoader to instantiate a variety of differnet things
          • AbstractPluginLoader processes things in a loop, recording errors in SolrConfig.severeErrors when a particular instance can't be inited, but creating the rest of the objects just fine.
          • when abortOnConfigurationError=false this results in solr using a schema with missing filters (or missing fields, etc...) .. the only thing that protects people when abortOnConfigurationError=true is that SolrDispatchFilter pays attention to both abortOnConfigurationError and SolrConfig.severeErrors (someone using embedded Solr might never notice the error at all, even if the config did say abortOnConfigurationError=true)
          Show
          Hoss Man added a comment - Scratch that – i get it now: IndexSchem uses anonymous subclasses of AbstractPluginLoader to instantiate a variety of differnet things AbstractPluginLoader processes things in a loop, recording errors in SolrConfig.severeErrors when a particular instance can't be inited, but creating the rest of the objects just fine. when abortOnConfigurationError=false this results in solr using a schema with missing filters (or missing fields, etc...) .. the only thing that protects people when abortOnConfigurationError=true is that SolrDispatchFilter pays attention to both abortOnConfigurationError and SolrConfig.severeErrors (someone using embedded Solr might never notice the error at all, even if the config did say abortOnConfigurationError=true)
          Hide
          Hoss Man added a comment -

          I believe this issue will be fixed by the patch in SOLR-1846 (or a future version of it if i missed something)

          Show
          Hoss Man added a comment - I believe this issue will be fixed by the patch in SOLR-1846 (or a future version of it if i missed something)
          Hide
          Hoss Man added a comment -

          fixed via SOLR-1846, IndexSchema now fails to initialize if any of the individual plugins fails to initialize (the exception is propogated up to hte caller)

          Committed revision 945886.

          Show
          Hoss Man added a comment - fixed via SOLR-1846 , IndexSchema now fails to initialize if any of the individual plugins fails to initialize (the exception is propogated up to hte caller) Committed revision 945886.

            People

            • Assignee:
              Hoss Man
              Reporter:
              Yonik Seeley
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development