Solr
  1. Solr
  2. SOLR-4543

setting shardHandlerFactory in solr.xml/solr.properties does not work

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.2
    • Fix Version/s: 4.3, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      solr.xml is supposed to allow solr/cores/shardHandlerFactory setting (and likewise, the new solr.properties has shardHandlerFactory.class). However, the code that reads this setting (ConfigSolrXmlBackCompat and SolrProperties) always instantiates an HttpShardHandlerFactory.

      1. PATCH-4543.txt
        3 kB
        Ryan Ernst
      2. SOLR-4543.patch
        15 kB
        Robert Muir
      3. SOLR-4543.patch
        14 kB
        Robert Muir
      4. SOLR-4543.patch
        11 kB
        Robert Muir
      5. SOLR-4543.patch
        10 kB
        Robert Muir

        Activity

        Hide
        Ryan Ernst added a comment -

        I believe this patch fixes the bug, but I have not figured out where the appropriate place would be to add a unit test for this setting. Any suggestions?

        Show
        Ryan Ernst added a comment - I believe this patch fixes the bug, but I have not figured out where the appropriate place would be to add a unit test for this setting. Any suggestions?
        Hide
        Robert Muir added a comment -

        here's a test that fails without the patch, passes with it.

        Show
        Robert Muir added a comment - here's a test that fails without the patch, passes with it.
        Hide
        Robert Muir added a comment -

        I tried adding a .properties case just like the .xml case, but this one fails.

        Seems to me something about the resource loading here is not right.

        Show
        Robert Muir added a comment - I tried adding a .properties case just like the .xml case, but this one fails. Seems to me something about the resource loading here is not right.
        Hide
        Robert Muir added a comment -

        updated patch: passing for .properties too.

        This had 2 bugs:
        1. unlike the xml case, resourceloader was not consistently set, so it was null.
        2. attributes and arguments for the plugininfo were wrong: instead of "class=" they were shardHandlerFactory.class= and so on, because the .properties prefix never got removed.

        Show
        Robert Muir added a comment - updated patch: passing for .properties too. This had 2 bugs: 1. unlike the xml case, resourceloader was not consistently set, so it was null. 2. attributes and arguments for the plugininfo were wrong: instead of "class=" they were shardHandlerFactory.class= and so on, because the .properties prefix never got removed.
        Hide
        Robert Muir added a comment -

        just added tests that arguments are properly passed to this thing in both xml and .properties cases.

        Show
        Robert Muir added a comment - just added tests that arguments are properly passed to this thing in both xml and .properties cases.
        Hide
        Erick Erickson added a comment -

        Thanks Robert! I'll be looking at this shortly.

        Show
        Erick Erickson added a comment - Thanks Robert! I'll be looking at this shortly.
        Hide
        Commit Tag Bot added a comment -

        [trunk commit] Erick Erickson
        http://svn.apache.org/viewvc?view=revision&revision=1456433

        Fix for SOLR-4543, setting shardHandlerFactory in solr.xml/solr.properties does not work

        Show
        Commit Tag Bot added a comment - [trunk commit] Erick Erickson http://svn.apache.org/viewvc?view=revision&revision=1456433 Fix for SOLR-4543 , setting shardHandlerFactory in solr.xml/solr.properties does not work
        Hide
        Commit Tag Bot added a comment -

        [trunk commit] Erick Erickson
        http://svn.apache.org/viewvc?view=revision&revision=1456435

        SOLR-4543 added note to CHANGES.txt

        Show
        Commit Tag Bot added a comment - [trunk commit] Erick Erickson http://svn.apache.org/viewvc?view=revision&revision=1456435 SOLR-4543 added note to CHANGES.txt
        Hide
        Erick Erickson added a comment -

        trunk, r: 1456433
        trunk (CHANGES.txt) 1456435
        4.x r: 1456466

        Show
        Erick Erickson added a comment - trunk, r: 1456433 trunk (CHANGES.txt) 1456435 4.x r: 1456466
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] Erick Erickson
        http://svn.apache.org/viewvc?view=revision&revision=1456466

        Fix for SOLR-4543, setting shardHandlerFactory in solr.xml/solr.properties does not work

        Show
        Commit Tag Bot added a comment - [branch_4x commit] Erick Erickson http://svn.apache.org/viewvc?view=revision&revision=1456466 Fix for SOLR-4543 , setting shardHandlerFactory in solr.xml/solr.properties does not work
        Hide
        Uwe Schindler added a comment -

        Closed after release.

        Show
        Uwe Schindler added a comment - Closed after release.

          People

          • Assignee:
            Erick Erickson
            Reporter:
            Ryan Ernst
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development