Solr
  1. Solr
  2. SOLR-2651

The new SolrCore#reload method does not create a ZkSolrResourceLoader in ZooKeeper mode

    Details

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

      Description

      this is a trunk bug

      reload is hard wired to simply make a SolrResourceLoader - this means that in ZooKeeper mode, changes to config are not picked up on a reload - instead you would get any local configs.

      1. SOLR-2651.patch
        7 kB
        Mark Miller
      2. SOLR-2651.patch
        5 kB
        Mark Miller
      3. SOLR-2651.patch
        3 kB
        Mark Miller

        Activity

        Hide
        Mark Miller added a comment -

        fixes the bug - could do a little trimming on the code duplication, but as Noble is working on abstracting zk stuff out as a plugin anyway, might as well put any effort on that in then.

        I should still add a test to Solr that would catch this as well.

        Show
        Mark Miller added a comment - fixes the bug - could do a little trimming on the code duplication, but as Noble is working on abstracting zk stuff out as a plugin anyway, might as well put any effort on that in then. I should still add a test to Solr that would catch this as well.
        Hide
        Mark Miller added a comment -

        I've added a test and fixed a test issue where the zkclient was trying to reconnect to the wrong zkserver port due to asking the OS for a port.

        I'll commit in a bit.

        Show
        Mark Miller added a comment - I've added a test and fixed a test issue where the zkclient was trying to reconnect to the wrong zkserver port due to asking the OS for a port. I'll commit in a bit.
        Hide
        Mark Miller added a comment -

        Hmm...there is still a problem to fix...

        Show
        Mark Miller added a comment - Hmm...there is still a problem to fix...
        Hide
        Mark Miller added a comment -

        Latest patch.

        Show
        Mark Miller added a comment - Latest patch.
        Hide
        Mark Miller added a comment -

        whoops - that was the same patch as before - here is the new one.

        Show
        Mark Miller added a comment - whoops - that was the same patch as before - here is the new one.
        Hide
        Mark Miller added a comment -

        committed r1146905

        Show
        Mark Miller added a comment - committed r1146905
        Hide
        Mark Miller added a comment -

        one more tweak needed here - we grab the new instance dir with:

            File instanceDir = new File(cd.getInstanceDir());
            if (!instanceDir.isAbsolute()) {
              instanceDir = new File(getSolrHome(), instanceDir.getName());
            }
        

        Problem is, if you use a non absolute path that is deeper than one folder, you only get the last part of the path with instanceDir.getName() - it should simply be cd.getInstanceDir instead.

        Show
        Mark Miller added a comment - one more tweak needed here - we grab the new instance dir with: File instanceDir = new File(cd.getInstanceDir()); if (!instanceDir.isAbsolute()) { instanceDir = new File(getSolrHome(), instanceDir.getName()); } Problem is, if you use a non absolute path that is deeper than one folder, you only get the last part of the path with instanceDir.getName() - it should simply be cd.getInstanceDir instead.
        Hide
        Mark Miller added a comment -

        this had been fixed

        Show
        Mark Miller added a comment - this had been fixed

          People

          • Assignee:
            Mark Miller
            Reporter:
            Mark Miller
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development